CallbackNode

from panda3d.core import CallbackNode
class CallbackNode

Bases: PandaNode

A special node that can issue arbitrary callbacks to user code, either during the cull or draw traversals.

Inheritance diagram

Inheritance diagram of CallbackNode

__init__(*args, **kwargs)
clearCullCallback()

C++ Interface: clear_cull_callback(const CallbackNode self)

/**
  • Removes the callback set by an earlier call to set_cull_callback().

*/

clearDrawCallback()

C++ Interface: clear_draw_callback(const CallbackNode self)

/**
  • Removes the callback set by an earlier call to set_draw_callback().

*/

clear_cull_callback()

C++ Interface: clear_cull_callback(const CallbackNode self)

/**
  • Removes the callback set by an earlier call to set_cull_callback().

*/

clear_draw_callback()

C++ Interface: clear_draw_callback(const CallbackNode self)

/**
  • Removes the callback set by an earlier call to set_draw_callback().

*/

cull_callback
draw_callback
getClassType()

C++ Interface: get_class_type()

getCullCallback()

C++ Interface: get_cull_callback(CallbackNode self)

/**
  • Returns the CallbackObject set by set_cull_callback().

*/

getDrawCallback()

C++ Interface: get_draw_callback(CallbackNode self)

/**
  • Returns the CallbackObject set by set_draw_callback().

*/

get_class_type()

C++ Interface: get_class_type()

get_cull_callback()

C++ Interface: get_cull_callback(CallbackNode self)

/**
  • Returns the CallbackObject set by set_cull_callback().

*/

get_draw_callback()

C++ Interface: get_draw_callback(CallbackNode self)

/**
  • Returns the CallbackObject set by set_draw_callback().

*/

setCullCallback()

C++ Interface: set_cull_callback(const CallbackNode self, CallbackObject object)

/**
  • Sets the CallbackObject that will be notified when this node is visited

  • during the cull traversal. This callback will be made during the cull

  • thread.

  • The cull traversal is responsible for determining which nodes are visible

  • and within the view frustum, and for accumulating state and transform, and

  • generally building up the list of CullableObjects that are to be eventually

  • passed to the draw traversal for rendering.

  • At the time the cull traversal callback is made, the node has been

  • determined to be visible and it has passed the bounding-volume test, so it

  • lies within the view frustum.

  • The callback is passed an instance of a NodeCullCallbackData, which

  • contains pointers to the CullTraverser and CullTraverserData–enough data

  • to examine the current node and its place within the scene graph. The

  • callback replaces the normal cull behavior, so if your callback does

  • nothing, the cull traversal will not continue below this node. If you wish

  • the cull traversal to continue to visit this node and below, you must call

  • cbdata->upcall() from your callback.

*/

setDrawCallback()

C++ Interface: set_draw_callback(const CallbackNode self, CallbackObject object)

/**
  • Sets the CallbackObject that will be notified when this node is visited

  • during the draw traversal. This callback will be made during the draw

  • thread.

  • The draw traversal is responsible for actually issuing the commands to the

  • graphics engine to draw primitives. Its job is to walk through the list of

  • CullableObjects build up by the cull traversal, as quickly as possible,

  • issuing the appropriate commands to draw each one.

  • At the time the draw traversal callback is made, the graphics state has

  • been loaded with the correct modelview transform and render state, and the

  • primitives (if any) in this node are ready to be drawn.

  • The callback is passed an instance of a GeomDrawCallbackData, which

  • contains pointers to the current state and transform, as well as the

  • current GSG. There is a Geom pointer as well, but it will always be NULL

  • to this callback, since the CallbackNode does not itself contain any Geoms.

*/

set_cull_callback()

C++ Interface: set_cull_callback(const CallbackNode self, CallbackObject object)

/**
  • Sets the CallbackObject that will be notified when this node is visited

  • during the cull traversal. This callback will be made during the cull

  • thread.

  • The cull traversal is responsible for determining which nodes are visible

  • and within the view frustum, and for accumulating state and transform, and

  • generally building up the list of CullableObjects that are to be eventually

  • passed to the draw traversal for rendering.

  • At the time the cull traversal callback is made, the node has been

  • determined to be visible and it has passed the bounding-volume test, so it

  • lies within the view frustum.

  • The callback is passed an instance of a NodeCullCallbackData, which

  • contains pointers to the CullTraverser and CullTraverserData–enough data

  • to examine the current node and its place within the scene graph. The

  • callback replaces the normal cull behavior, so if your callback does

  • nothing, the cull traversal will not continue below this node. If you wish

  • the cull traversal to continue to visit this node and below, you must call

  • cbdata->upcall() from your callback.

*/

set_draw_callback()

C++ Interface: set_draw_callback(const CallbackNode self, CallbackObject object)

/**
  • Sets the CallbackObject that will be notified when this node is visited

  • during the draw traversal. This callback will be made during the draw

  • thread.

  • The draw traversal is responsible for actually issuing the commands to the

  • graphics engine to draw primitives. Its job is to walk through the list of

  • CullableObjects build up by the cull traversal, as quickly as possible,

  • issuing the appropriate commands to draw each one.

  • At the time the draw traversal callback is made, the graphics state has

  • been loaded with the correct modelview transform and render state, and the

  • primitives (if any) in this node are ready to be drawn.

  • The callback is passed an instance of a GeomDrawCallbackData, which

  • contains pointers to the current state and transform, as well as the

  • current GSG. There is a Geom pointer as well, but it will always be NULL

  • to this callback, since the CallbackNode does not itself contain any Geoms.

*/