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

Mesh Class Reference

Defines a Mesh used in a Milkshape3D Model. More...

#include <Mesh.h>

List of all members.

Public Member Functions

 Mesh (const Model &model)
 Create a new empty Mesh belonging to the specified Model.

const char * initialize (const char *ptr)
 Initialize the Mesh using the (raw) data from the Milkshape model.

const ModelgetModel () const
 Accessor for the Model of this Mesh.

bool hasMaterial () const
 Does this Mesh have a material?

const MaterialgetMaterial () const
 If Mesh::hasMaterial, return the Material.

const std::vector< const Triangle * > & getTriangles () const
 The Triangles for the faces of this Mesh.

void addTriangle (const Triangle *triangle)
 Add a new Triangle to this Mesh.


Private Member Functions

 Mesh (const Mesh &copy)
 Do not allow this Mesh to be copied.

Meshoperator= (const Mesh &rhs)
 Do not allow this Mesh to be copied.


Private Attributes

int m_materialIndex
 The index of the Material used to draw the Triangles in this Mesh.

std::vector< const Triangle * > m_triangles
 The Triangles representing this Mesh.

const Modelm_model
 The Model to which this Mesh belongs.


Friends

std::ostream & operator<< (std::ostream &out, const Mesh &mesh)
 Insertion operator for this Mesh into an output stream.


Detailed Description

Defines a Mesh used in a Milkshape3D Model.


Member Function Documentation

const char * Mesh::initialize const char *  ptr  ) 
 

Initialize the Mesh using the (raw) data from the Milkshape model.

The method reads the material index, vertex count and vertex indices and returns the (raw) pointer past the end of the mesh.


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 23:40:58 2003 for Shadow by doxygen 1.3.2