osg.Callback¶
-
class
osg.Callback¶ Represents: c++ class Wraps: osg::Callback Bases: osg.ObjectBase class for all Scene Graph callbacks.
Constructors:
-
osg.Callback(luafunction__ f)¶ Construct callback from Lua function.
Parameters: f ( luafunction) – Callback function with signature: function(osg.Object object, osg.Object data) -> bool Function will be called onosg.Callback.run()automatically.
Methods:
-
:
traverse(osg.Object object, osg.Object data)¶ Traverse the nested callbacks or call
osg.NodeVisitor.traverse()if the object isosg.Node, and data isosg.NodeVisitor.Parameters: - object (
osg.Object) – The Object that the callback is attached to. - data (
osg.Object) – The data, is typically theosg.NodeVisitorthat is invoking the callback
Return type: bool- object (
-
:
run(osg.Object object, osg.Object data)¶ Invoke the callback.
Parameters: - object (
osg.Object) – The Object that the callback is attached to. - data (
osg.Object) – The data, is typically theosg.NodeVisitorthat is invoking the callback
Return type: bool- object (
-
:
getNestedCallback()¶ Get nested callback if exists, otherwise return nil.
Return type: osg.Callback
-
:
asCallback()¶ -
Return type: osg.Callback
-
:
asStateAttributeCallback()¶ -
Return type: osg.StateAttributeCallback
-
:
asNodeCallback()¶ -
Return type: osg.NodeCallback
-
:
asUniformCallback()¶ -
Return type: osg.UniformCallback
-