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

EggData Class Reference

#include <eggData.h>

Inheritance diagram for EggData:

EggGroupNode EggNode EggNamedObject EggObject Namable TypedReferenceCount TypedObject ReferenceCount List of all members.

Public Member Functions

INLINE EggData ()
INLINE EggData (const EggData &copy)
INLINE EggData & operator= (const EggData &copy)
bool read (Filename filename)
bool read (istream &in)
void merge (EggData &other)
bool load_externals (const DSearchPath &searchpath=DSearchPath())
int collapse_equivalent_textures ()
int collapse_equivalent_materials ()
bool write_egg (Filename filename)
bool write_egg (ostream &out)
INLINE void set_auto_resolve_externals (bool resolve)
INLINE bool get_auto_resolve_externals () const
void set_coordinate_system (CoordinateSystem coordsys)
INLINE CoordinateSystem get_coordinate_system () const
INLINE void set_egg_filename (const Filename &egg_filenamea)
INLINE const Filename & get_egg_filename () const
INLINE void recompute_vertex_normals (double threshold)
INLINE void recompute_polygon_normals ()
INLINE void strip_normals ()
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

bool resolve_egg_filename (Filename &egg_filename, const DSearchPath &searchpath=DSearchPath())
TypeHandle get_class_type ()
void init_type ()

Protected Member Functions

virtual void write (ostream &out, int indent_level=0) const

Private Member Functions

void post_read ()
void pre_write ()

Private Attributes

bool _auto_resolve_externals
CoordinateSystem _coordsys
Filename _egg_filename

Static Private Attributes

TypeHandle _type_handle

Constructor & Destructor Documentation

INLINE EggData::EggData  ) 
 

Referenced by read().

INLINE EggData::EggData const EggData &  copy  ) 
 


Member Function Documentation

int EggData::collapse_equivalent_materials  ) 
 

Definition at line 228 of file eggData.cxx.

References EggMaterialCollection::collapse_equivalent_materials(), EggMaterial::E_mref_name, and EggMaterialCollection::find_used_materials().

int EggData::collapse_equivalent_textures  ) 
 

Definition at line 210 of file eggData.cxx.

References EggTexture::E_tref_name, and textures.

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

Reimplemented from EggGroupNode.

Definition at line 102 of file eggData.h.

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

INLINE bool EggData::get_auto_resolve_externals  )  const
 

Referenced by post_read().

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

Reimplemented from EggGroupNode.

Definition at line 91 of file eggData.h.

INLINE CoordinateSystem EggData::get_coordinate_system  )  const
 

Referenced by load_externals(), and merge().

INLINE const Filename& EggData::get_egg_filename  )  const
 

Referenced by EggLoader::build_graph(), post_read(), and read().

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

Reimplemented from EggGroupNode.

Definition at line 99 of file eggData.h.

References EggGroupNode::get_class_type().

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

Reimplemented from EggGroupNode.

Definition at line 94 of file eggData.h.

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

Referenced by init_libegg().

bool EggData::load_externals const DSearchPath &  searchpath = DSearchPath()  ) 
 

Definition at line 194 of file eggData.cxx.

References get_coordinate_system(), and EggGroupNode::r_load_externals().

Referenced by EggGroupNode::r_load_externals().

void EggData::merge EggData &  other  ) 
 

Definition at line 167 of file eggData.cxx.

References CS_default, get_coordinate_system(), set_coordinate_system(), and EggGroupNode::steal_children().

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

void EggData::post_read  )  [private]
 

Definition at line 316 of file eggData.cxx.

References _coordsys, CoordinateSystem, CS_default, CS_invalid, CS_yup_right, EggGroupNode::find_coordsys_entry(), get_auto_resolve_externals(), get_egg_filename(), EggGroupNode::r_mark_coordsys(), EggGroupNode::resolve_filenames(), and set_coordinate_system().

void EggData::pre_write  )  [private]
 

Definition at line 355 of file eggData.cxx.

References EggGroupNode::begin(), EggMaterialCollection::collapse_equivalent_materials(), EggGroupNode::end(), EggMaterialCollection::extract_materials(), EggComment::get_class_type(), EggMaterialCollection::insert_materials(), EggGroupNode::iterator, EggMaterialCollection::remove_unused_materials(), EggMaterialCollection::sort_by_mref(), textures, EggNameUniquifier::uniquify(), and EggMaterialCollection::uniquify_mrefs().

Referenced by write_egg().

bool EggData::read istream &  in  ) 
 

Definition at line 139 of file eggData.cxx.

References EggGroupNode::clear(), data, egg_cleanup_parser(), egg_error_count(), egg_init_parser(), EggData(), eggyyparse(), get_egg_filename(), EggGroupNode::PT(), and EggGroupNode::steal_children().

bool EggData::read Filename  filename  ) 
 

Definition at line 89 of file eggData.cxx.

References VirtualFileSystem::get_global_ptr(), NULL, VirtualFileSystem::open_read_file(), and set_egg_filename().

Referenced by EggGroupNode::r_load_externals().

INLINE void EggData::recompute_polygon_normals  ) 
 

INLINE void EggData::recompute_vertex_normals double  threshold  ) 
 

bool EggData::resolve_egg_filename Filename &  egg_filename,
const DSearchPath &  searchpath = DSearchPath()
[static]
 

Definition at line 49 of file eggData.cxx.

References VirtualFileSystem::exists(), get_egg_path(), VirtualFileSystem::get_global_ptr(), get_model_path(), and VirtualFileSystem::resolve_filename().

Referenced by EggGroupNode::r_load_externals().

INLINE void EggData::set_auto_resolve_externals bool  resolve  ) 
 

Referenced by EggGroupNode::r_load_externals().

void EggData::set_coordinate_system CoordinateSystem  coordsys  ) 
 

Definition at line 275 of file eggData.cxx.

References _coordsys, CS_default, CS_invalid, default_coordinate_system, EggGroupNode::r_transform(), and EggGroupNode::update_under().

Referenced by EggLoader::EggLoader(), merge(), post_read(), and EggGroupNode::r_load_externals().

INLINE void EggData::set_egg_filename const Filename &  egg_filenamea  ) 
 

Referenced by read().

INLINE void EggData::strip_normals  ) 
 

Reimplemented from EggGroupNode.

void EggData::write ostream &  out,
int  indent_level = 0
const [protected, virtual]
 

Reimplemented from EggGroupNode.

Definition at line 301 of file eggData.cxx.

References _coordsys, EggGroupNode::write(), and EggCoordinateSystem::write().

Referenced by write_egg().

bool EggData::write_egg ostream &  out  ) 
 

Definition at line 260 of file eggData.cxx.

References pre_write(), and write().

bool EggData::write_egg Filename  filename  ) 
 

Definition at line 241 of file eggData.cxx.


Member Data Documentation

bool EggData::_auto_resolve_externals [private]
 

Definition at line 86 of file eggData.h.

CoordinateSystem EggData::_coordsys [private]
 

Definition at line 87 of file eggData.h.

Referenced by post_read(), set_coordinate_system(), and write().

Filename EggData::_egg_filename [private]
 

Definition at line 88 of file eggData.h.

TypeHandle EggData::_type_handle [static, private]
 

Reimplemented from EggGroupNode.

Definition at line 37 of file eggData.cxx.


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