#include <trimesh.h>
Public Types | |
typedef std::list< Face > | TFaces |
Public Member Functions | |
TriMesh () | |
~TriMesh () | |
void | SetPos (boost::shared_array< float > pos, int vertexCount) |
sets the list of vertices and their number | |
const boost::shared_array< float > | GetPos () const |
returns the list of vertices | |
int | GetVertexCount () const |
returns the number of stored vertices | |
void | SetTexCoords (boost::shared_array< float > texCoords) |
sets the list of texture coordinates | |
const boost::shared_array< float > | GetTexCoords () const |
returns the list of texture coordinates | |
void | SetNormals (boost::shared_array< float > normal) |
sets the list of surface normals | |
const boost::shared_array< float > | GetNormals () const |
returns the list of surface normals | |
void | AddFace (boost::shared_ptr< IndexBuffer > indeces, const std::string &material="default") |
adds a face, i.e. | |
void | AddFace (const Face &face) |
adds a face, i.e. | |
const TFaces & | GetFaces () const |
returns the list of faces | |
const std::string & | GetName () const |
returns the name of this trimesh | |
void | SetName (const std::string &name) |
sets the name of this trimesh | |
Protected Attributes | |
std::string | mName |
the unique name of this trimesh | |
int | mVertexCount |
the number of stored vertices | |
boost::shared_array< float > | mPos |
the list of vertices | |
boost::shared_array< float > | mTexCoords |
the list of texture coordinates | |
boost::shared_array< float > | mNormal |
the list of surface normals | |
TFaces | mFaces |
the list of faces | |
Classes | |
struct | Face |
Each index list additionally stores the name of a material. Triangle meshes describe arbitrary geometry. They are used for collision detection and rendering. Vertices, texture coordinates and normales are each stored as a list of floats, with three consecutive values for each vector. Indeces are stored using the IndexBuffer class as as list of unsigned int values.
Definition at line 44 of file trimesh.h.
|
|
|
Definition at line 28 of file trimesh.cpp. |
|
Definition at line 32 of file trimesh.cpp. |
|
adds a face, i.e. a list of indeces. Each consecutive triple describes one triangle Definition at line 78 of file trimesh.cpp. References mFaces. |
|
adds a face, i.e. a list of indeces. Each consecutive triple describes one triangle Definition at line 72 of file trimesh.cpp. References mFaces. |
|
returns the list of faces
Definition at line 83 of file trimesh.cpp. References mFaces. |
|
returns the name of this trimesh
Definition at line 88 of file trimesh.cpp. References mName. |
|
returns the list of surface normals
Definition at line 67 of file trimesh.cpp. References mNormal. |
|
returns the list of vertices
Definition at line 52 of file trimesh.cpp. References mPos. |
|
returns the list of texture coordinates
Definition at line 62 of file trimesh.cpp. References mTexCoords. |
|
returns the number of stored vertices
Definition at line 57 of file trimesh.cpp. References mVertexCount. |
|
sets the name of this trimesh
Definition at line 93 of file trimesh.cpp. References mName. |
|
sets the list of surface normals
|
|
sets the list of vertices and their number
|
|
sets the list of texture coordinates
|
|
the list of faces
Definition at line 120 of file trimesh.h. Referenced by AddFace(), and GetFaces(). |
|
the unique name of this trimesh
|
|
the list of surface normals
Definition at line 117 of file trimesh.h. Referenced by GetNormals(). |
|
the list of vertices
Definition at line 111 of file trimesh.h. Referenced by GetPos(). |
|
the list of texture coordinates
Definition at line 114 of file trimesh.h. Referenced by GetTexCoords(). |
|
the number of stored vertices
Definition at line 108 of file trimesh.h. Referenced by GetVertexCount(). |