Public Member Functions
Mesh Class Reference

A 3D mesh. More...

#include <Mesh.hh>

List of all members.

Public Member Functions

 Mesh ()
 Constructor.
virtual ~Mesh ()
 Destructor.
void SetPath (const std::string &_path)
 Set the path which contains the mesh resource.
std::string GetPath () const
 Get the path which contains the mesh resource.
void SetName (const std::string &n)
 Set the name of this mesh.
std::string GetName () const
 Get the name of this mesh.
math::Vector3 GetMax () const
 Get the maximun X,Y,Z values.
math::Vector3 GetMin () const
 Get the minimum X,Y,Z values.
unsigned int GetVertexCount () const
 Return the number of vertices.
unsigned int GetNormalCount () const
 Return the number of normals.
unsigned int GetIndexCount () const
 Return the number of indicies.
unsigned int GetTexCoordCount () const
 Return the number of texture coordinates.
void AddSubMesh (SubMesh *child)
 Add a submesh mesh.
unsigned int GetSubMeshCount () const
 Get the number of children.
unsigned int AddMaterial (Material *mat)
 Add a material to the mesh.
unsigned int GetMaterialCount () const
 Get the number of materials.
const MaterialGetMaterial (int index) const
 Get a material.
const SubMeshGetSubMesh (unsigned int i) const
 Get a child.
void FillArrays (float **vertArr, unsigned int **indArr) const
 Put all the data into flat arrays.
void RecalculateNormals ()
 Recalculate all the normals.
void GetAABB (math::Vector3 &center, math::Vector3 &min_xyz, math::Vector3 &max_xyz)
 Get AABB coordinate.
void SetMeshCenter (math::Vector3 center)
 Reset mesh center to geometric center.
void GenSphericalTexCoord (math::Vector3 center)
 Generate texture coordinates using spherical projection from center.

Detailed Description

A 3D mesh.


Member Function Documentation

unsigned int AddMaterial ( Material mat)

Add a material to the mesh.

Returns:
Index of this material

The documentation for this class was generated from the following file: