Panda3D
Public Member Functions | List of all members
CullTraverserData Class Reference

This collects together the pieces of data that are accumulated for each node while walking the scene graph during the cull traversal. More...

Public Member Functions

 applyTransformAndState (CullTraverser trav)
 Applies the transform and state from the current node onto the current data. This also evaluates billboards, etc. More...
 
 applyTransformAndState (CullTraverser trav, const TransformState node_transform, const RenderState node_state, const RenderEffects node_effects, const RenderAttrib off_clip_planes)
 Applies the indicated transform and state changes (e.g. as extracted from a node) onto the current data. This also evaluates billboards, etc. More...
 
const TransformState getInternalTransform (const CullTraverser trav)
 Returns the internal transform: the modelview transform in the GSG's internal coordinate system. More...
 
const TransformState getModelviewTransform (const CullTraverser trav)
 Returns the modelview transform: the relative transform from the camera to the model. More...
 
const TransformState getNetTransform (const CullTraverser trav)
 Returns the net transform: the relative transform from root of the scene graph to the current node. More...
 
bool isInView (const DrawMask camera_mask)
 Returns true if the current node is within the view frustum, false otherwise. If the node's bounding volume falls completely within the view frustum, this will also reset the view frustum pointer, saving some work for future nodes. More...
 
bool isThisNodeHidden (const DrawMask camera_mask)
 Returns true if this particular node is hidden, even though we might be traversing past this node to find a child node that has had show_through() called for it. If this returns true, the node should not be rendered. More...
 
PandaNode node ()
 Returns the node traversed to so far. More...
 

Detailed Description

This collects together the pieces of data that are accumulated for each node while walking the scene graph during the cull traversal.

Having this as a separate object simplifies the parameter list to CullTraverser::r_traverse(), as well as to other functions like PandaNode::cull_callback(). It also makes it easier to add cull parameters, and provides a place to abstract out some of the cull behavior (like view-frustum culling).

Member Function Documentation

◆ applyTransformAndState() [1/2]

applyTransformAndState ( CullTraverser  trav)

Applies the transform and state from the current node onto the current data. This also evaluates billboards, etc.

◆ applyTransformAndState() [2/2]

applyTransformAndState ( CullTraverser  trav,
const TransformState  node_transform,
const RenderState  node_state,
const RenderEffects  node_effects,
const RenderAttrib  off_clip_planes 
)

Applies the indicated transform and state changes (e.g. as extracted from a node) onto the current data. This also evaluates billboards, etc.

◆ getInternalTransform()

const TransformState getInternalTransform ( const CullTraverser  trav)

Returns the internal transform: the modelview transform in the GSG's internal coordinate system.

◆ getModelviewTransform()

const TransformState getModelviewTransform ( const CullTraverser  trav)

Returns the modelview transform: the relative transform from the camera to the model.

◆ getNetTransform()

const TransformState getNetTransform ( const CullTraverser  trav)

Returns the net transform: the relative transform from root of the scene graph to the current node.

◆ isInView()

bool isInView ( const DrawMask  camera_mask)

Returns true if the current node is within the view frustum, false otherwise. If the node's bounding volume falls completely within the view frustum, this will also reset the view frustum pointer, saving some work for future nodes.

◆ isThisNodeHidden()

bool isThisNodeHidden ( const DrawMask  camera_mask)

Returns true if this particular node is hidden, even though we might be traversing past this node to find a child node that has had show_through() called for it. If this returns true, the node should not be rendered.

◆ node()

PandaNode node ( )

Returns the node traversed to so far.