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

XFileMesh Class Reference

#include <xFileMesh.h>

Inheritance diagram for XFileMesh:

Namable List of all members.

Public Member Functions

 XFileMesh ()
 ~XFileMesh ()
void clear ()
void add_polygon (EggPolygon *egg_poly)
int add_vertex (EggVertex *egg_vertex, EggPrimitive *egg_prim)
int add_normal (EggVertex *egg_vertex, EggPrimitive *egg_prim)
int add_material (EggPrimitive *egg_prim)
int add_vertex (XFileVertex *vertex)
int add_normal (XFileNormal *normal)
int add_material (XFileMaterial *material)
bool create_polygons (EggGroupNode *egg_parent, XFileToEggConverter *converter)
bool has_normals () const
bool has_colors () const
bool has_uvs () const
bool has_materials () const
int get_num_materials () const
XFileMaterialget_material (int n) const
void make_mesh_data (Datagram &raw_data)
void make_normal_data (Datagram &raw_data)
void make_color_data (Datagram &raw_data)
void make_uv_data (Datagram &raw_data)
void make_material_list_data (Datagram &raw_data)
bool read_mesh_data (const Datagram &raw_data)
bool read_normal_data (const Datagram &raw_data)
bool read_color_data (const Datagram &raw_data)
bool read_uv_data (const Datagram &raw_data)
bool read_material_list_data (const Datagram &raw_data)

Private Types

typedef pvector< XFileVertex * > Vertices
typedef pvector< XFileNormal * > Normals
typedef pvector< XFileMaterial * > Materials
typedef pvector< XFileFace * > Faces
typedef pmap< XFileVertex *,
int, IndirectCompareTo< XFileVertex > > 
UniqueVertices
typedef pmap< XFileNormal *,
int, IndirectCompareTo< XFileNormal > > 
UniqueNormals
typedef pmap< XFileMaterial *,
int, IndirectCompareTo< XFileMaterial > > 
UniqueMaterials

Private Attributes

Vertices _vertices
Normals _normals
Materials _materials
Faces _faces
UniqueVertices _unique_vertices
UniqueNormals _unique_normals
UniqueMaterials _unique_materials
bool _has_normals
bool _has_colors
bool _has_uvs
bool _has_materials

Member Typedef Documentation

typedef pvector<XFileFace *> XFileMesh::Faces [private]
 

Definition at line 87 of file xFileMesh.h.

typedef pvector<XFileMaterial *> XFileMesh::Materials [private]
 

Definition at line 86 of file xFileMesh.h.

typedef pvector<XFileNormal *> XFileMesh::Normals [private]
 

Definition at line 85 of file xFileMesh.h.

typedef pmap<XFileMaterial *, int, IndirectCompareTo<XFileMaterial> > XFileMesh::UniqueMaterials [private]
 

Definition at line 96 of file xFileMesh.h.

typedef pmap<XFileNormal *, int, IndirectCompareTo<XFileNormal> > XFileMesh::UniqueNormals [private]
 

Definition at line 95 of file xFileMesh.h.

typedef pmap<XFileVertex *, int, IndirectCompareTo<XFileVertex> > XFileMesh::UniqueVertices [private]
 

Definition at line 94 of file xFileMesh.h.

typedef pvector<XFileVertex *> XFileMesh::Vertices [private]
 

Definition at line 84 of file xFileMesh.h.


Constructor & Destructor Documentation

XFileMesh::XFileMesh  ) 
 

Definition at line 36 of file xFileMesh.cxx.

References _has_colors, _has_materials, _has_normals, and _has_uvs.

XFileMesh::~XFileMesh  ) 
 

Definition at line 49 of file xFileMesh.cxx.

References clear().


Member Function Documentation

int XFileMesh::add_material XFileMaterial material  ) 
 

Definition at line 247 of file xFileMesh.cxx.

References _materials, and _unique_materials.

int XFileMesh::add_material EggPrimitive egg_prim  ) 
 

Definition at line 182 of file xFileMesh.cxx.

References _has_materials, _materials, _unique_materials, XFileMaterial::has_material(), and XFileMaterial::set_from_egg().

Referenced by XFileToEggConverter::convert_material(), and XFileFace::set_from_egg().

int XFileMesh::add_normal XFileNormal normal  ) 
 

Definition at line 231 of file xFileMesh.cxx.

References _normals, and _unique_normals.

int XFileMesh::add_normal EggVertex egg_vertex,
EggPrimitive egg_prim
 

Definition at line 151 of file xFileMesh.cxx.

References XFileNormal::_has_normal, _has_normals, _normals, _unique_normals, and XFileNormal::set_from_egg().

Referenced by read_normal_data(), and XFileFace::set_from_egg().

void XFileMesh::add_polygon EggPolygon egg_poly  ) 
 

Definition at line 102 of file xFileMesh.cxx.

References _faces, and XFileFace::set_from_egg().

Referenced by XFileMaker::add_polyset().

int XFileMesh::add_vertex XFileVertex vertex  ) 
 

Definition at line 215 of file xFileMesh.cxx.

References _unique_vertices, and _vertices.

int XFileMesh::add_vertex EggVertex egg_vertex,
EggPrimitive egg_prim
 

Definition at line 116 of file xFileMesh.cxx.

References XFileVertex::_has_color, _has_colors, XFileVertex::_has_uv, _has_uvs, _unique_vertices, _vertices, and XFileVertex::set_from_egg().

Referenced by read_mesh_data(), and XFileFace::set_from_egg().

void XFileMesh::clear  ) 
 

Definition at line 59 of file xFileMesh.cxx.

References _faces, _has_colors, _has_materials, _has_normals, _has_uvs, _materials, _normals, _unique_materials, _unique_normals, _unique_vertices, and _vertices.

Referenced by read_mesh_data(), and ~XFileMesh().

bool XFileMesh::create_polygons EggGroupNode egg_parent,
XFileToEggConverter converter
 

Definition at line 262 of file xFileMesh.cxx.

References XFileVertex::_color, _faces, XFileVertex::_has_color, XFileNormal::_has_normal, XFileVertex::_has_uv, XFileFace::_material_index, _materials, XFileNormal::_normal, _normals, XFileVertex::_point, XFileVertex::_uv, _vertices, XFileFace::_vertices, EggPrimitive::add_vertex(), XFileMaterial::apply_to_egg(), EggVertexPool::create_unique_vertex(), Namable::get_name(), LCAST, nout, NULL, EggAttributes::set_color(), EggAttributes::set_normal(), EggVertex::set_pos(), EggAttributes::set_uv(), and TexCoordd.

Referenced by XFileToEggConverter::convert_mesh().

XFileMaterial * XFileMesh::get_material int  n  )  const
 

Definition at line 383 of file xFileMesh.cxx.

References _materials, n, nassertr, and NULL.

Referenced by XFileMaker::finalize_mesh().

int XFileMesh::get_num_materials  )  const
 

Definition at line 372 of file xFileMesh.cxx.

References _materials.

Referenced by XFileMaker::finalize_mesh().

bool XFileMesh::has_colors  )  const
 

Definition at line 339 of file xFileMesh.cxx.

References _has_colors.

Referenced by XFileMaker::finalize_mesh().

bool XFileMesh::has_materials  )  const
 

Definition at line 361 of file xFileMesh.cxx.

References _has_materials.

Referenced by XFileMaker::finalize_mesh().

bool XFileMesh::has_normals  )  const
 

Definition at line 328 of file xFileMesh.cxx.

References _has_normals.

Referenced by XFileMaker::finalize_mesh().

bool XFileMesh::has_uvs  )  const
 

Definition at line 350 of file xFileMesh.cxx.

References _has_uvs.

Referenced by XFileMaker::finalize_mesh().

void XFileMesh::make_color_data Datagram raw_data  ) 
 

Definition at line 465 of file xFileMesh.cxx.

References XFileVertex::_color, _vertices, Datagram::add_float32(), Datagram::add_int32(), Datagram::clear(), and Colorf.

Referenced by XFileMaker::finalize_mesh().

void XFileMesh::make_material_list_data Datagram raw_data  ) 
 

Definition at line 510 of file xFileMesh.cxx.

References _faces, XFileFace::_material_index, _materials, Datagram::add_int32(), and Datagram::clear().

Referenced by XFileMaker::finalize_mesh().

void XFileMesh::make_mesh_data Datagram raw_data  ) 
 

Definition at line 395 of file xFileMesh.cxx.

References _faces, XFileVertex::_point, XFileFace::_vertices, _vertices, Datagram::add_float32(), Datagram::add_int32(), Datagram::clear(), and Vertexf.

Referenced by XFileMaker::finalize_mesh().

void XFileMesh::make_normal_data Datagram raw_data  ) 
 

Definition at line 430 of file xFileMesh.cxx.

References _faces, XFileNormal::_normal, _normals, XFileFace::_vertices, Datagram::add_float32(), Datagram::add_int32(), Datagram::clear(), and Normalf.

Referenced by XFileMaker::finalize_mesh().

void XFileMesh::make_uv_data Datagram raw_data  ) 
 

Definition at line 490 of file xFileMesh.cxx.

References XFileVertex::_uv, _vertices, Datagram::add_float32(), Datagram::add_int32(), Datagram::clear(), and TexCoordf.

Referenced by XFileMaker::finalize_mesh().

bool XFileMesh::read_color_data const Datagram raw_data  ) 
 

Definition at line 620 of file xFileMesh.cxx.

References XFileVertex::_color, XFileVertex::_has_color, _vertices, DatagramIterator::get_float32(), DatagramIterator::get_int32(), DatagramIterator::get_remaining_size(), and nout.

Referenced by XFileToEggConverter::convert_mesh_colors().

bool XFileMesh::read_material_list_data const Datagram raw_data  ) 
 

Definition at line 686 of file xFileMesh.cxx.

References _faces, XFileFace::_material_index, DatagramIterator::get_int32(), DatagramIterator::get_remaining_size(), and nout.

Referenced by XFileToEggConverter::convert_mesh_material_list().

bool XFileMesh::read_mesh_data const Datagram raw_data  ) 
 

Definition at line 528 of file xFileMesh.cxx.

References _faces, XFileFace::Vertex::_normal_index, XFileVertex::_point, XFileFace::Vertex::_vertex_index, XFileFace::_vertices, add_vertex(), clear(), DatagramIterator::get_float32(), DatagramIterator::get_int32(), DatagramIterator::get_remaining_size(), and nout.

Referenced by XFileToEggConverter::convert_mesh().

bool XFileMesh::read_normal_data const Datagram raw_data  ) 
 

Definition at line 572 of file xFileMesh.cxx.

References _faces, XFileNormal::_has_normal, XFileNormal::_normal, XFileFace::_vertices, add_normal(), DatagramIterator::get_float32(), DatagramIterator::get_int32(), DatagramIterator::get_remaining_size(), and nout.

Referenced by XFileToEggConverter::convert_mesh_normals().

bool XFileMesh::read_uv_data const Datagram raw_data  ) 
 

Definition at line 654 of file xFileMesh.cxx.

References XFileVertex::_has_uv, XFileVertex::_uv, _vertices, DatagramIterator::get_float32(), DatagramIterator::get_int32(), DatagramIterator::get_remaining_size(), and nout.

Referenced by XFileToEggConverter::convert_mesh_uvs().


Member Data Documentation

Faces XFileMesh::_faces [private]
 

Definition at line 92 of file xFileMesh.h.

Referenced by add_polygon(), clear(), create_polygons(), make_material_list_data(), make_mesh_data(), make_normal_data(), read_material_list_data(), read_mesh_data(), and read_normal_data().

bool XFileMesh::_has_colors [private]
 

Definition at line 102 of file xFileMesh.h.

Referenced by add_vertex(), clear(), has_colors(), and XFileMesh().

bool XFileMesh::_has_materials [private]
 

Definition at line 104 of file xFileMesh.h.

Referenced by add_material(), clear(), has_materials(), and XFileMesh().

bool XFileMesh::_has_normals [private]
 

Definition at line 101 of file xFileMesh.h.

Referenced by add_normal(), clear(), has_normals(), and XFileMesh().

bool XFileMesh::_has_uvs [private]
 

Definition at line 103 of file xFileMesh.h.

Referenced by add_vertex(), clear(), has_uvs(), and XFileMesh().

Materials XFileMesh::_materials [private]
 

Definition at line 91 of file xFileMesh.h.

Referenced by add_material(), clear(), create_polygons(), get_material(), get_num_materials(), and make_material_list_data().

Normals XFileMesh::_normals [private]
 

Definition at line 90 of file xFileMesh.h.

Referenced by add_normal(), clear(), create_polygons(), and make_normal_data().

UniqueMaterials XFileMesh::_unique_materials [private]
 

Definition at line 99 of file xFileMesh.h.

Referenced by add_material(), and clear().

UniqueNormals XFileMesh::_unique_normals [private]
 

Definition at line 98 of file xFileMesh.h.

Referenced by add_normal(), and clear().

UniqueVertices XFileMesh::_unique_vertices [private]
 

Definition at line 97 of file xFileMesh.h.

Referenced by add_vertex(), and clear().

Vertices XFileMesh::_vertices [private]
 

Definition at line 89 of file xFileMesh.h.

Referenced by add_vertex(), clear(), create_polygons(), make_color_data(), make_mesh_data(), make_uv_data(), read_color_data(), and read_uv_data().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 01:01:31 2003 for Panda-Tool by doxygen1.3