osg.Callback¶
-
class
osg.
Callback
¶ Represents: c++ class Wraps: osg::Callback Bases: osg.Object
Base class for all Scene Graph callbacks.
Constructors:
-
osg.
Callback
(luafunction__ f)¶ Construct callback from Lua function.
Параметры: 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
.Параметры: - object (
osg.Object
) – The Object that the callback is attached to. - data (
osg.Object
) – The data, is typically theosg.NodeVisitor
that is invoking the callback
Тип результата: bool
- object (
-
:
run
(osg.Object object, osg.Object data)¶ Invoke the callback.
Параметры: - object (
osg.Object
) – The Object that the callback is attached to. - data (
osg.Object
) – The data, is typically theosg.NodeVisitor
that is invoking the callback
Тип результата: bool
- object (
-
:
getNestedCallback
()¶ Get nested callback if exists, otherwise return nil.
Тип результата: osg.Callback
-