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

EggNode Class Reference

#include <eggNode.h>

Inheritance diagram for EggNode:

EggNamedObject EggObject Namable TypedReferenceCount TypedObject ReferenceCount EggAnimData EggComment EggCoordinateSystem EggFilenameNode EggGroupNode EggMaterial EggPrimitive EggVertexPool List of all members.

Public Member Functions

INLINE EggNode (const string &name="")
INLINE EggNode (const EggNode &copy)
INLINE EggNode & operator= (const EggNode &copy)
INLINE EggGroupNodeget_parent () const
INLINE int get_depth () const
INLINE bool is_under_instance () const
INLINE bool is_under_transform () const
INLINE bool is_local_coord () const
INLINE const LMatrix4d & get_vertex_frame () const
INLINE const LMatrix4d & get_node_frame () const
INLINE const LMatrix4d & get_vertex_frame_inv () const
INLINE const LMatrix4d & get_node_frame_inv () const
INLINE const LMatrix4d & get_vertex_to_node () const
INLINE const LMatrix4d & get_node_to_vertex () const
INLINE void transform (const LMatrix4d &mat)
INLINE void transform_vertices_only (const LMatrix4d &mat)
INLINE void flatten_transforms ()
void apply_texmats ()
virtual EggRenderModedetermine_alpha_mode ()
virtual EggRenderModedetermine_depth_write_mode ()
virtual EggRenderModedetermine_depth_test_mode ()
virtual EggRenderModedetermine_draw_order ()
virtual EggRenderModedetermine_bin ()
virtual void write (ostream &out, int indent_level) const=0
bool parse_egg (const string &egg_syntax)
void test_under_integrity () const
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Protected Types

typedef RefCountObj< LMatrix4d > MatrixFrame
enum  UnderFlags { UF_under_instance = 0x001, UF_under_transform = 0x002, UF_local_coord = 0x004 }

Protected Member Functions

virtual bool egg_start_parse_body ()
virtual void update_under (int depth_offset)
virtual void adjust_under ()
virtual void r_transform (const LMatrix4d &mat, const LMatrix4d &inv, CoordinateSystem to_cs)
virtual void r_transform_vertices (const LMatrix4d &mat)
virtual void r_mark_coordsys (CoordinateSystem cs)
virtual void r_flatten_transforms ()
virtual void r_apply_texmats (EggTextureCollection &textures)
 PT (MatrixFrame) _vertex_frame
 PT (MatrixFrame) _node_frame
 PT (MatrixFrame) _vertex_frame_inv
 PT (MatrixFrame) _node_frame_inv
 PT (MatrixFrame) _vertex_to_node
 PT (MatrixFrame) _node_to_vertex

Protected Attributes

EggGroupNode_parent
int _depth
int _under_flags

Static Private Attributes

TypeHandle _type_handle

Friends

class EggGroupNode

Member Typedef Documentation

typedef RefCountObj<LMatrix4d> EggNode::MatrixFrame [protected]
 

Definition at line 109 of file eggNode.h.

Referenced by EggGroup::adjust_under().


Member Enumeration Documentation

enum EggNode::UnderFlags [protected]
 

Enumeration values:
UF_under_instance 
UF_under_transform 
UF_local_coord 

Definition at line 83 of file eggNode.h.


Constructor & Destructor Documentation

INLINE EggNode::EggNode const string &  name = ""  ) 
 

INLINE EggNode::EggNode const EggNode &  copy  ) 
 


Member Function Documentation

void EggNode::adjust_under  )  [protected, virtual]
 

Reimplemented in EggGroup.

Definition at line 279 of file eggNode.cxx.

Referenced by update_under().

void EggNode::apply_texmats  ) 
 

Definition at line 41 of file eggNode.cxx.

References r_apply_texmats(), and textures.

EggRenderMode * EggNode::determine_alpha_mode  )  [virtual]
 

Reimplemented in EggGroup, and EggPrimitive.

Definition at line 57 of file eggNode.cxx.

References _parent, and NULL.

Referenced by EggPrimitive::determine_alpha_mode(), and EggGroup::determine_alpha_mode().

EggRenderMode * EggNode::determine_bin  )  [virtual]
 

Reimplemented in EggGroup, and EggPrimitive.

Definition at line 129 of file eggNode.cxx.

References _parent, and NULL.

Referenced by EggPrimitive::determine_bin(), and EggGroup::determine_bin().

EggRenderMode * EggNode::determine_depth_test_mode  )  [virtual]
 

Reimplemented in EggGroup, and EggPrimitive.

Definition at line 93 of file eggNode.cxx.

References _parent, and NULL.

Referenced by EggPrimitive::determine_depth_test_mode(), and EggGroup::determine_depth_test_mode().

EggRenderMode * EggNode::determine_depth_write_mode  )  [virtual]
 

Reimplemented in EggGroup, and EggPrimitive.

Definition at line 75 of file eggNode.cxx.

References _parent, and NULL.

Referenced by EggPrimitive::determine_depth_write_mode(), and EggGroup::determine_depth_write_mode().

EggRenderMode * EggNode::determine_draw_order  )  [virtual]
 

Reimplemented in EggGroup, and EggPrimitive.

Definition at line 111 of file eggNode.cxx.

References _parent, and NULL.

Referenced by EggPrimitive::determine_draw_order(), and EggGroup::determine_draw_order().

bool EggNode::egg_start_parse_body  )  [protected, virtual]
 

Reimplemented in EggGroup, EggPrimitive, and EggTexture.

Definition at line 219 of file eggNode.cxx.

Referenced by parse_egg().

INLINE void EggNode::flatten_transforms  ) 
 

virtual TypeHandle EggNode::force_init_type void   )  [inline, virtual]
 

Reimplemented from EggNamedObject.

Reimplemented in EggAnimData, EggBin, EggComment, EggCoordinateSystem, EggCurve, EggData, EggExternalReference, EggFilenameNode, EggGroup, EggGroupNode, EggMaterial, EggNurbsCurve, EggNurbsSurface, EggPoint, EggPolygon, EggPrimitive, EggSAnimData, EggSurface, EggTable, EggTexture, EggVertexPool, EggXfmAnimData, and EggXfmSAnim.

Definition at line 132 of file eggNode.h.

References EggNamedObject::get_class_type(), and EggNamedObject::init_type().

TypeHandle EggNode::get_class_type void   )  [inline, static]
 

Reimplemented from EggNamedObject.

Reimplemented in EggAnimData, EggBin, EggComment, EggCoordinateSystem, EggCurve, EggData, EggExternalReference, EggFilenameNode, EggGroup, EggGroupNode, EggMaterial, EggNurbsCurve, EggNurbsSurface, EggPoint, EggPolygon, EggPrimitive, EggSAnimData, EggSurface, EggTable, EggTexture, EggVertexPool, EggXfmAnimData, and EggXfmSAnim.

Definition at line 121 of file eggNode.h.

Referenced by EggVertexPool::force_init_type(), EggMaterial::force_init_type(), EggGroupNode::force_init_type(), EggFilenameNode::force_init_type(), EggCoordinateSystem::force_init_type(), EggComment::force_init_type(), EggAnimData::force_init_type(), EggVertexPool::get_type(), EggMaterial::get_type(), EggGroupNode::get_type(), EggFilenameNode::get_type(), EggCoordinateSystem::get_type(), EggComment::get_type(), EggAnimData::get_type(), EggVertexPool::init_type(), EggPrimitive::init_type(), EggMaterial::init_type(), EggGroupNode::init_type(), EggFilenameNode::init_type(), EggCoordinateSystem::init_type(), EggComment::init_type(), and EggAnimData::init_type().

INLINE int EggNode::get_depth  )  const
 

Referenced by EggGroupNode::prepare_add_child(), and EggGroupNode::prepare_remove_child().

INLINE const LMatrix4d& EggNode::get_node_frame  )  const
 

Referenced by EggGroup::adjust_under().

INLINE const LMatrix4d& EggNode::get_node_frame_inv  )  const
 

Referenced by EggGroup::adjust_under(), CharacterMaker::make_dynamic_primitive(), and CharacterMaker::make_static_primitive().

INLINE const LMatrix4d& EggNode::get_node_to_vertex  )  const
 

INLINE EggGroupNode* EggNode::get_parent  )  const
 

Referenced by ComputedVerticesMaker::add_vertex_joints(), CharacterMaker::determine_primitive_home(), EggBinMaker::make_bins_for_group(), parse_egg(), EggGroupNode::prepare_add_child(), and EggGroupNode::prepare_remove_child().

virtual TypeHandle EggNode::get_type void   )  const [inline, virtual]
 

Reimplemented from EggNamedObject.

Reimplemented in EggAnimData, EggBin, EggComment, EggCoordinateSystem, EggCurve, EggData, EggExternalReference, EggFilenameNode, EggGroup, EggGroupNode, EggMaterial, EggNurbsCurve, EggNurbsSurface, EggPoint, EggPolygon, EggPrimitive, EggSAnimData, EggSurface, EggTable, EggTexture, EggVertexPool, EggXfmAnimData, and EggXfmSAnim.

Definition at line 129 of file eggNode.h.

References EggNamedObject::get_class_type().

INLINE const LMatrix4d& EggNode::get_vertex_frame  )  const
 

Referenced by EggGroup::adjust_under(), CharacterMaker::make_dynamic_primitive(), CharacterMaker::make_static_primitive(), EggPrimitive::r_flatten_transforms(), and EggGroup::r_flatten_transforms().

INLINE const LMatrix4d& EggNode::get_vertex_frame_inv  )  const
 

Referenced by EggGroup::adjust_under().

INLINE const LMatrix4d& EggNode::get_vertex_to_node  )  const
 

Referenced by EggLoader::create_collision_plane(), EggLoader::create_collision_polygons(), EggLoader::make_collision_sphere(), EggLoader::make_indexed_primitive(), and EggLoader::make_nonindexed_primitive().

void EggNode::init_type void   )  [inline, static]
 

Reimplemented from EggNamedObject.

Reimplemented in EggAnimData, EggBin, EggComment, EggCoordinateSystem, EggCurve, EggData, EggExternalReference, EggFilenameNode, EggGroup, EggGroupNode, EggMaterial, EggNurbsCurve, EggNurbsSurface, EggPoint, EggPolygon, EggPrimitive, EggSAnimData, EggSurface, EggTable, EggTexture, EggVertexPool, EggXfmAnimData, and EggXfmSAnim.

Definition at line 124 of file eggNode.h.

References EggNamedObject::get_class_type(), EggNamedObject::init_type(), and register_type().

Referenced by EggVertexPool::force_init_type(), EggMaterial::force_init_type(), EggGroupNode::force_init_type(), EggFilenameNode::force_init_type(), EggCoordinateSystem::force_init_type(), EggComment::force_init_type(), EggAnimData::force_init_type(), init_libegg(), EggVertexPool::init_type(), EggPrimitive::init_type(), EggMaterial::init_type(), EggGroupNode::init_type(), EggFilenameNode::init_type(), EggCoordinateSystem::init_type(), EggComment::init_type(), and EggAnimData::init_type().

INLINE bool EggNode::is_local_coord  )  const
 

Referenced by EggVertex::get_num_global_coord(), EggVertex::get_num_local_coord(), IsLocalVertexSplitter::operator()(), EggPrimitive::r_flatten_transforms(), and EggGroup::r_flatten_transforms().

INLINE bool EggNode::is_under_instance  )  const
 

Referenced by EggGroupNode::r_collect_vertex_normals().

INLINE bool EggNode::is_under_transform  )  const
 

INLINE EggNode& EggNode::operator= const EggNode &  copy  ) 
 

Referenced by EggGroupNode::operator=().

bool EggNode::parse_egg const string &  egg_syntax  ) 
 

Definition at line 149 of file eggNode.cxx.

References DCAST_INTO_R, egg_cleanup_parser(), egg_error_count(), egg_init_parser(), egg_start_parse_body(), eggyyparse(), EggGroupNode::get_class_type(), get_parent(), and TypedObject::is_of_type().

Referenced by EggLoader::do_expand_object_type().

EggNode::PT MatrixFrame   )  [protected]
 

EggNode::PT MatrixFrame   )  [protected]
 

EggNode::PT MatrixFrame   )  [protected]
 

EggNode::PT MatrixFrame   )  [protected]
 

EggNode::PT MatrixFrame   )  [protected]
 

EggNode::PT MatrixFrame   )  [protected]
 

void EggNode::r_apply_texmats EggTextureCollection textures  )  [protected, virtual]
 

Reimplemented in EggGroupNode, EggNurbsSurface, and EggPrimitive.

Definition at line 341 of file eggNode.cxx.

Referenced by apply_texmats().

void EggNode::r_flatten_transforms  )  [protected, virtual]
 

Reimplemented in EggGroup, EggGroupNode, and EggPrimitive.

Definition at line 332 of file eggNode.cxx.

void EggNode::r_mark_coordsys CoordinateSystem  cs  )  [protected, virtual]
 

Reimplemented in EggGroupNode, EggXfmAnimData, and EggXfmSAnim.

Definition at line 323 of file eggNode.cxx.

void EggNode::r_transform const LMatrix4d &  mat,
const LMatrix4d &  inv,
CoordinateSystem  to_cs
[protected, virtual]
 

Reimplemented in EggGroup, EggGroupNode, EggPrimitive, EggVertexPool, EggXfmAnimData, and EggXfmSAnim.

Definition at line 297 of file eggNode.cxx.

void EggNode::r_transform_vertices const LMatrix4d &  mat  )  [protected, virtual]
 

Reimplemented in EggGroupNode, and EggVertexPool.

Definition at line 310 of file eggNode.cxx.

void EggNode::test_under_integrity  )  const
 

Definition at line 179 of file eggNode.cxx.

References _depth, _parent, _under_flags, EggGroupNode::begin(), EggGroupNode::end(), EggGroupNode::iterator, NULL, and ReferenceCount::test_ref_count_integrity().

Referenced by EggXfmSAnim::write(), EggTable::write(), and EggGroup::write().

INLINE void EggNode::transform const LMatrix4d &  mat  ) 
 

Reimplemented in EggVertexPool.

INLINE void EggNode::transform_vertices_only const LMatrix4d &  mat  ) 
 

void EggNode::update_under int  depth_offset  )  [protected, virtual]
 

Reimplemented in EggGroupNode.

Definition at line 237 of file eggNode.cxx.

References _depth, _parent, _under_flags, adjust_under(), depth, and NULL.

Referenced by EggGroupNode::prepare_add_child(), EggGroupNode::prepare_remove_child(), and EggGroupNode::update_under().

virtual void EggNode::write ostream &  out,
int  indent_level
const [pure virtual]
 

Implemented in EggComment, EggCoordinateSystem, EggData, EggExternalReference, EggGroup, EggGroupNode, EggMaterial, EggNurbsCurve, EggNurbsSurface, EggPoint, EggPolygon, EggSAnimData, EggTable, EggTexture, EggVertexPool, EggXfmAnimData, and EggXfmSAnim.


Friends And Related Function Documentation

friend class EggGroupNode [friend]
 

Definition at line 137 of file eggNode.h.


Member Data Documentation

int EggNode::_depth [protected]
 

Definition at line 106 of file eggNode.h.

Referenced by test_under_integrity(), and update_under().

EggGroupNode* EggNode::_parent [protected]
 

Definition at line 105 of file eggNode.h.

Referenced by determine_alpha_mode(), determine_bin(), determine_depth_test_mode(), determine_depth_write_mode(), determine_draw_order(), EggGroupNode::prepare_add_child(), EggGroupNode::prepare_remove_child(), PT(), test_under_integrity(), and update_under().

TypeHandle EggNode::_type_handle [static, private]
 

Reimplemented from EggNamedObject.

Reimplemented in EggAnimData, EggBin, EggComment, EggCoordinateSystem, EggCurve, EggData, EggExternalReference, EggFilenameNode, EggGroup, EggGroupNode, EggMaterial, EggNurbsCurve, EggNurbsSurface, EggPoint, EggPolygon, EggPrimitive, EggSAnimData, EggSurface, EggTable, EggTexture, EggVertexPool, EggXfmAnimData, and EggXfmSAnim.

Definition at line 30 of file eggNode.cxx.

int EggNode::_under_flags [protected]
 

Definition at line 107 of file eggNode.h.

Referenced by EggGroup::adjust_under(), test_under_integrity(), and update_under().


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