CullTraverser

class CullTraverser

Bases: TypedReferenceCount

This object performs a depth-first traversal of the scene graph, with optional view-frustum culling, collecting CullState and searching for GeomNodes. Each renderable Geom encountered is passed along with its associated RenderState to the CullHandler object.

Inheritance diagram

digraph inheritance24017da130 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "CullTraverser" [URL="acron.core.CullTraverser.html#acron.core.CullTraverser",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedReferenceCount" -> "CullTraverser" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedReferenceCount" [URL="acron.core.TypedReferenceCount.html#acron.core.TypedReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedReferenceCount" [arrowsize=0.75,style=""]; }
CullTraverser.__init__()
CullTraverser.do_traverse()

Internal method called by traverse() and traverse_down(). Traverses the given node, assuming it has already been checked with is_in_view().

CullTraverser.draw_bounding_volume()

Draws an appropriate visualization of the indicated bounding volume.

CullTraverser.end_traverse()

Should be called when the traverser has finished traversing its scene, this gives it a chance to do any necessary finalization.

static CullTraverser.flush_level()

Flushes the PStatCollectors used during traversal.

CullTraverser.get_camera_mask()

Returns the visibility mask from the camera viewing the scene.

CullTraverser.get_camera_transform()

Returns the position of the camera relative to the starting node.

static CullTraverser.get_class_type()
CullTraverser.get_cull_handler()

Returns the object that will receive the culled Geoms.

CullTraverser.get_current_thread()

Returns the currently-executing thread object, as passed to the CullTraverser constructor.

CullTraverser.get_depth_offset_decals()

Returns true, as depth offsets are the only way that we implement decals nowadays.

CullTraverser.get_effective_incomplete_render()

Returns true if the cull traversal is effectively in incomplete_render state, considering both the GSG’s incomplete_render and the current DisplayRegion’s incomplete_render flags. This returns the flag during the cull traversal; see GSG::get_effective_incomplete_render() for this same flag during the draw traversal.

CullTraverser.get_fake_view_frustum_cull()

Returns true if fake view frustum culling is active.

CullTraverser.get_gsg()

Returns the GraphicsStateGuardian in effect.

CullTraverser.get_initial_state()

Returns the initial RenderState at the top of the scene graph we are traversing, or the empty state if the initial state was never set.

CullTraverser.get_portal_clipper()

Returns the _portal_clipper pointer

CullTraverser.get_scene()

Returns the SceneSetup object.

CullTraverser.get_tag_state_key()

Returns the tag state key that has been specified for the scene’s camera, if any.

CullTraverser.get_view_frustum()

Returns the bounding volume that corresponds to the view frustum, or NULL if the view frustum is not in use or has not been set.

Note that the view frustum returned here is always in the coordinate space of the starting node, not the current node, even if it is sampled during a traversal. To get the view frustum in the current node’s coordinate space, check in the current CullTraverserData.

CullTraverser.get_world_transform()

Returns the position of the starting node relative to the camera. This is the inverse of the camera transform.

Note that this value is always the position of the starting node, not the current node, even if it is sampled during a traversal. To get the transform of the current node use CullTraverserData::get_modelview_transform().

CullTraverser.has_tag_state_key()

Returns true if a nonempty tag state key has been specified for the scene’s camera, false otherwise.

CullTraverser.set_camera_mask()

Changes the visibility mask for the camera viewing the scene. This is normally set automatically at the time setup_scene() is called; you should change this only if you want to render some set of objects different from what the camera normally would draw.

CullTraverser.set_cull_handler()

Specifies the object that will receive the culled Geoms. This must be set before calling traverse().

CullTraverser.set_portal_clipper()

Specifies _portal_clipper object pointer that subsequent traverse() or traverse_below may use.

CullTraverser.set_scene()

Sets the SceneSetup object that indicates the initial camera position, etc. This must be called before traversal begins.

CullTraverser.set_view_frustum()

Specifies the bounding volume that corresponds to the view frustum. Any primitives that fall entirely outside of this volume are not drawn.

Nowadays, this gets set automatically by set_scene().

CullTraverser.traverse()

Begins the traversal from the indicated node.

CullTraverser.traverse_below()

Calls traverse_down on each child.