Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

SceneGraphReducer Class Reference

#include <sceneGraphReducer.h>

List of all members.

Protected Member Functions

void r_apply_attribs (PandaNode *node, const AccumulatedAttribs &attribs, int attrib_types, GeomTransformer &transformer)
int r_flatten (PandaNode *grandparent_node, PandaNode *parent_node, bool combine_siblings)
int flatten_siblings (PandaNode *parent_node)
bool consider_child (PandaNode *grandparent_node, PandaNode *parent_node, PandaNode *child_node)
bool consider_siblings (PandaNode *parent_node, PandaNode *child1, PandaNode *child2)
bool do_flatten_child (PandaNode *grandparent_node, PandaNode *parent_node, PandaNode *child_node)
PandaNodedo_flatten_siblings (PandaNode *parent_node, PandaNode *child1, PandaNode *child2)
 PT (PandaNode) collapse_nodes(PandaNode *node1
void choose_name (PandaNode *preserve, PandaNode *source1, PandaNode *source2)

Protected Attributes

PandaNodenode2
PandaNode bool siblings

Private Types

enum  AttribTypes {
  TT_transform = 0x001, TT_color = 0x002, TT_color_scale = 0x004, TT_tex_matrix = 0x008,
  TT_other = 0x010
}

Private Member Functions

INLINE ~SceneGraphReducer ()
INLINE void apply_attribs (PandaNode *node, int attrib_types=~0)
INLINE void apply_attribs (PandaNode *node, const AccumulatedAttribs &attribs, int attrib_types, GeomTransformer &transformer)
int flatten (PandaNode *root, bool combine_siblings)

Private Attributes

PUBLISHED __pad0__: INLINE SceneGraphReducer()
GeomTransformer _transformer


Member Enumeration Documentation

enum SceneGraphReducer::AttribTypes [private]
 

Enumeration values:
TT_transform 
TT_color 
TT_color_scale 
TT_tex_matrix 
TT_other 

Definition at line 50 of file sceneGraphReducer.h.


Constructor & Destructor Documentation

INLINE SceneGraphReducer::~SceneGraphReducer  )  [private]
 


Member Function Documentation

INLINE void SceneGraphReducer::apply_attribs PandaNode node,
const AccumulatedAttribs attribs,
int  attrib_types,
GeomTransformer transformer
[private]
 

INLINE void SceneGraphReducer::apply_attribs PandaNode node,
int  attrib_types = ~0
[private]
 

Referenced by TextNode::apply_attribs_to_vertices(), NodePath::flatten_light(), NodePath::flatten_medium(), NodePath::flatten_strong(), PT(), and PGItem::xform().

void SceneGraphReducer::choose_name PandaNode preserve,
PandaNode source1,
PandaNode source2
[protected]
 

Definition at line 525 of file sceneGraphReducer.cxx.

References PandaNode::preserve_name().

Referenced by do_flatten_child(), and do_flatten_siblings().

bool SceneGraphReducer::consider_child PandaNode grandparent_node,
PandaNode parent_node,
PandaNode child_node
[protected]
 

Definition at line 372 of file sceneGraphReducer.cxx.

References PandaNode::get_draw_mask(), PandaNode::get_effects(), PandaNode::get_state(), PandaNode::get_transform(), RenderEffects::safe_to_combine(), and PandaNode::safe_to_combine().

Referenced by r_flatten().

bool SceneGraphReducer::consider_siblings PandaNode parent_node,
PandaNode child1,
PandaNode child2
[protected]
 

Definition at line 405 of file sceneGraphReducer.cxx.

Referenced by flatten_siblings().

bool SceneGraphReducer::do_flatten_child PandaNode grandparent_node,
PandaNode parent_node,
PandaNode child_node
[protected]
 

Definition at line 422 of file sceneGraphReducer.cxx.

References choose_name(), NULL, PT(), and PandaNode::replace_child().

Referenced by r_flatten().

PandaNode * SceneGraphReducer::do_flatten_siblings PandaNode parent_node,
PandaNode child1,
PandaNode child2
[protected]
 

Definition at line 465 of file sceneGraphReducer.cxx.

References choose_name(), NULL, PT(), PandaNode::remove_child(), and PandaNode::replace_child().

Referenced by flatten_siblings().

int SceneGraphReducer::flatten PandaNode root,
bool  combine_siblings
[private]
 

Definition at line 51 of file sceneGraphReducer.cxx.

References flatten_siblings(), PandaNode::ChildrenCopy::get_child(), PandaNode::ChildrenCopy::get_num_children(), r_flatten(), and root.

Referenced by NodePath::flatten_medium(), NodePath::flatten_strong(), and PT().

int SceneGraphReducer::flatten_siblings PandaNode parent_node  )  [protected]
 

Definition at line 298 of file sceneGraphReducer.cxx.

References consider_siblings(), do_flatten_siblings(), PandaNode::get_children(), NULL, PT(), RenderEffects::safe_to_combine(), and PandaNode::safe_to_combine().

Referenced by flatten(), and r_flatten().

SceneGraphReducer::PT PandaNode   )  [protected]
 

Referenced by do_flatten_child(), do_flatten_siblings(), flatten_siblings(), r_apply_attribs(), and r_flatten().

void SceneGraphReducer::r_apply_attribs PandaNode node,
const AccumulatedAttribs attribs,
int  attrib_types,
GeomTransformer transformer
[protected]
 

Definition at line 92 of file sceneGraphReducer.cxx.

References PandaNode::apply_attribs_to_vertices(), AccumulatedAttribs::apply_to_node(), AccumulatedAttribs::collect(), PandaNode::copy_children(), PandaNode::get_child(), PandaNode::get_effects(), PandaNode::get_num_children(), PandaNode::get_num_parents(), PandaNode::get_state(), PandaNode::get_transform(), PandaNode::get_type(), PandaNode::get_unsafe_to_apply_attribs(), PandaNode::make_copy(), PT(), PandaNode::replace_child(), PandaNode::safe_to_flatten(), PandaNode::safe_to_modify_transform(), PandaNode::safe_to_transform(), RenderEffects::safe_to_transform(), TT_transform, AccumulatedAttribs::write(), RenderEffects::write(), RenderState::write(), and TransformState::write().

int SceneGraphReducer::r_flatten PandaNode grandparent_node,
PandaNode parent_node,
bool  combine_siblings
[protected]
 

Definition at line 220 of file sceneGraphReducer.cxx.

References PandaNode::add_child(), consider_child(), do_flatten_child(), flatten_siblings(), PandaNode::get_child(), PandaNode::ChildrenCopy::get_child(), PandaNode::get_child_sort(), PandaNode::get_children_copy(), PandaNode::get_num_children(), PandaNode::ChildrenCopy::get_num_children(), PT(), PandaNode::remove_child(), and PandaNode::safe_to_combine().

Referenced by flatten().


Member Data Documentation

PUBLISHED SceneGraphReducer::__pad0__ [private]
 

Definition at line 47 of file sceneGraphReducer.h.

GeomTransformer SceneGraphReducer::_transformer [private]
 

Definition at line 89 of file sceneGraphReducer.h.

PandaNode* SceneGraphReducer::node2 [protected]
 

Definition at line 83 of file sceneGraphReducer.h.

PandaNode bool SceneGraphReducer::siblings [protected]
 

Definition at line 83 of file sceneGraphReducer.h.


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:13:33 2003 for Panda by doxygen1.3