Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File 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...

#include <cullTraverserData.h>

List of all members.

Public Member Functions

 CullTraverserData (const NodePath &start, const TransformState *render_transform, const TransformState *net_transform, const RenderState *state, GeometricBoundingVolume *view_frustum, GeometricBoundingVolume *guard_band)
 CullTraverserData (const CullTraverserData &copy)
void operator= (const CullTraverserData &copy)
 CullTraverserData (const CullTraverserData &parent, PandaNode *child)
 This constructor creates a CullTraverserData object that reflects the next node down in the traversal.

 ~CullTraverserData ()
PandaNodenode () const
 Returns the node traversed to so far.

bool is_in_view (const DrawMask &camera_mask)
 Returns true if the current node is within the view frustum, false otherwise.

void apply_transform_and_state (CullTraverser *trav)
 Applies the transform and state from the current node onto the current data.

void apply_transform_and_state (CullTraverser *trav, ConstPointerTo< TransformState > node_transform, ConstPointerTo< RenderState > node_state, ConstPointerTo< RenderEffects > node_effects)
 Applies the indicated transform and state changes (e.g.


Public Attributes

WorkingNodePath _node_path
ConstPointerTo< TransformState_render_transform
ConstPointerTo< TransformState_net_transform
ConstPointerTo< RenderState_state
PointerTo< GeometricBoundingVolume_view_frustum
PointerTo< GeometricBoundingVolume_guard_band

Private Member Functions

bool is_in_view_impl ()
 The private implementation of is_in_view().


Static Private Member Functions

ConstPointerTo< RenderStateget_fake_view_frustum_cull_state ()
 Returns a RenderState for rendering stuff in red wireframe, strictly for the fake_view_frustum_cull effect.


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).

Definition at line 64 of file cullTraverserData.h.


Constructor & Destructor Documentation

CullTraverserData::CullTraverserData const NodePath start,
const TransformState render_transform,
const TransformState net_transform,
const RenderState state,
GeometricBoundingVolume view_frustum,
GeometricBoundingVolume guard_band
[inline]
 

Definition at line 32 of file cullTraverserData.I.

CullTraverserData::CullTraverserData const CullTraverserData &  copy  )  [inline]
 

Definition at line 56 of file cullTraverserData.I.

References _guard_band, _net_transform, _node_path, _render_transform, _state, _view_frustum, and INLINE.

CullTraverserData::CullTraverserData const CullTraverserData &  parent,
PandaNode child
[inline]
 

This constructor creates a CullTraverserData object that reflects the next node down in the traversal.

Definition at line 95 of file cullTraverserData.I.

CullTraverserData::~CullTraverserData  )  [inline]
 

Definition at line 114 of file cullTraverserData.I.

References PandaNode::get_draw_mask(), PandaNode::get_transform(), INLINE, TransformState::is_invalid(), and node().


Member Function Documentation

void CullTraverserData::apply_transform_and_state CullTraverser trav,
ConstPointerTo< TransformState node_transform,
ConstPointerTo< RenderState node_state,
ConstPointerTo< RenderEffects node_effects
 

Applies the indicated transform and state changes (e.g.

as extracted from a node) onto the current data. This also evaluates billboards, etc.

Definition at line 45 of file cullTraverserData.cxx.

References NULL.

void CullTraverserData::apply_transform_and_state CullTraverser trav  )  [inline]
 

Applies the transform and state from the current node onto the current data.

This also evaluates billboards, etc.

Definition at line 182 of file cullTraverserData.I.

Referenced by is_in_view(), and CullTraverser::traverse().

ConstPointerTo< RenderState > CullTraverserData::get_fake_view_frustum_cull_state  )  [static, private]
 

Returns a RenderState for rendering stuff in red wireframe, strictly for the fake_view_frustum_cull effect.

Definition at line 171 of file cullTraverserData.cxx.

bool CullTraverserData::is_in_view const DrawMask camera_mask  )  [inline]
 

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.

Definition at line 147 of file cullTraverserData.I.

References apply_transform_and_state(), INLINE, and node().

Referenced by CullTraverser::traverse().

bool CullTraverserData::is_in_view_impl  )  [private]
 

The private implementation of is_in_view().

Definition at line 114 of file cullTraverserData.cxx.

References fake_view_frustum_cull.

PandaNode * CullTraverserData::node  )  const [inline]
 

Returns the node traversed to so far.

Definition at line 126 of file cullTraverserData.I.

Referenced by CullTraverser::get_bounds_inner_viz_state(), is_in_view(), CullTraverser::traverse(), and ~CullTraverserData().

void CullTraverserData::operator= const CullTraverserData &  copy  )  [inline]
 

Definition at line 75 of file cullTraverserData.I.

References INLINE.


Member Data Documentation

PointerTo< GeometricBoundingVolume > CullTraverserData::_guard_band
 

Definition at line 92 of file cullTraverserData.h.

Referenced by CullTraverserData().

ConstPointerTo< TransformState > CullTraverserData::_net_transform
 

Definition at line 89 of file cullTraverserData.h.

Referenced by CullTraverserData(), PGItem::has_cull_callback(), and LODNode::xform().

WorkingNodePath CullTraverserData::_node_path
 

Definition at line 87 of file cullTraverserData.h.

Referenced by CullTraverserData(), and RopeNode::safe_to_transform().

ConstPointerTo< TransformState > CullTraverserData::_render_transform
 

Definition at line 88 of file cullTraverserData.h.

Referenced by CullTraverserData().

ConstPointerTo< RenderState > CullTraverserData::_state
 

Definition at line 90 of file cullTraverserData.h.

Referenced by CollisionNode::combine_with(), CullTraverserData(), and PGItem::has_cull_callback().

PointerTo< GeometricBoundingVolume > CullTraverserData::_view_frustum
 

Definition at line 91 of file cullTraverserData.h.

Referenced by CullTraverserData().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:49:06 2003 for Panda by doxygen1.3