This collects together the pieces of data that are accumulated for each node while walking the scene graph during the cull traversal. More...
#include "cullTraverserData.h"
Public Member Functions | |
CullTraverserData (const NodePath &start, const TransformState *net_transform, const RenderState *state, GeometricBoundingVolume *view_frustum, Thread *current_thread) | |
CullTraverserData (const CullTraverserData &parent, PandaNode *child) | |
This constructor creates a CullTraverserData object that reflects the next node down in the traversal. More... | |
void | apply_transform (const TransformState *node_transform) |
Applies the indicated transform changes onto the current data. More... | |
void | apply_transform_and_state (CullTraverser *trav) |
Applies the transform and state from the current node onto the current data. More... | |
CPT (TransformState) get_modelview_transform(const CullTraverser *trav) const | |
CPT (TransformState) get_internal_transform(const CullTraverser *trav) const | |
CPT (TransformState) _net_transform | |
CPT (RenderState) _state | |
CPT (CullPlanes) _cull_planes | |
const TransformState * | get_net_transform (const CullTraverser *trav) const |
NodePath | get_node_path () const |
bool | is_in_view (const DrawMask &camera_mask) |
bool | is_this_node_hidden (const DrawMask &camera_mask) const |
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. More... | |
PandaNode * | node () const |
Returns the node traversed to so far. More... | |
PandaNodePipelineReader * | node_reader () |
Returns the PipelineReader for the node traversed to so far. More... | |
const PandaNodePipelineReader * | node_reader () const |
Returns the PipelineReader for the node traversed to so far. More... | |
PT (GeometricBoundingVolume) _view_frustum | |
Public Attributes | |
DrawMask | _draw_mask |
PandaNodePipelineReader | _node_reader |
int | _portal_depth |
get_node_path | |
Constructs and returns an actual NodePath that represents the same path we have just traversed. More... | |
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).
Definition at line 40 of file cullTraverserData.h.
|
inline |
This constructor creates a CullTraverserData object that reflects the next node down in the traversal.
Definition at line 43 of file cullTraverserData.I.
void CullTraverserData::apply_transform | ( | const TransformState * | node_transform | ) |
Applies the indicated transform changes onto the current data.
Definition at line 78 of file cullTraverserData.cxx.
References TransformState::is_identity(), and TransformState::is_singular().
Referenced by apply_transform_and_state().
void CullTraverserData::apply_transform_and_state | ( | CullTraverser * | trav | ) |
Applies the transform and state from the current node onto the current data.
This also evaluates billboards, etc.
Definition at line 35 of file cullTraverserData.cxx.
References apply_transform(), PandaNodePipelineReader::check_cached(), PandaNodePipelineReader::compose_draw_mask(), RenderEffects::cull_callback(), SceneSetup::get_camera_node(), PandaNodePipelineReader::get_effects(), CullTraverser::get_scene(), PandaNodePipelineReader::get_state(), PandaNodePipelineReader::get_tag(), CullTraverser::get_tag_state_key(), PandaNodePipelineReader::get_transform(), RenderEffects::has_cull_callback(), PandaNodePipelineReader::has_tag(), and CullTraverser::has_tag_state_key().
|
inline |
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.
Definition at line 160 of file cullTraverserData.I.
|
inline |
Returns the node traversed to so far.
Definition at line 66 of file cullTraverserData.I.
Referenced by NodeCullCallbackData::upcall().
|
inline |
Returns the PipelineReader for the node traversed to so far.
Definition at line 74 of file cullTraverserData.I.
|
inline |
Returns the PipelineReader for the node traversed to so far.
Definition at line 82 of file cullTraverserData.I.
|
inline |
Constructs and returns an actual NodePath that represents the same path we have just traversed.
Definition at line 70 of file cullTraverserData.h.