Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

oxygen::TriMesh Class Reference

) encapsulates a list of vertices, texture coordinates and normals together with an associated list of index lists. More...

#include <trimesh.h>

List of all members.

Public Types

typedef std::list< FaceTFaces

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 TFacesGetFaces () 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


Detailed Description

) encapsulates a list of vertices, texture coordinates and normals together with an associated list of index lists.

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.


Member Typedef Documentation

typedef std::list<Face> oxygen::TriMesh::TFaces
 

Definition at line 58 of file trimesh.h.


Constructor & Destructor Documentation

TriMesh::TriMesh  ) 
 

Definition at line 28 of file trimesh.cpp.

TriMesh::~TriMesh  ) 
 

Definition at line 32 of file trimesh.cpp.


Member Function Documentation

void TriMesh::AddFace const Face face  ) 
 

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.

void TriMesh::AddFace boost::shared_ptr< IndexBuffer indeces,
const std::string &  material = "default"
 

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.

const TriMesh::TFaces & TriMesh::GetFaces  )  const
 

returns the list of faces

Definition at line 83 of file trimesh.cpp.

References mFaces.

const std::string & TriMesh::GetName  )  const
 

returns the name of this trimesh

Definition at line 88 of file trimesh.cpp.

References mName.

const shared_array< float > TriMesh::GetNormals  )  const
 

returns the list of surface normals

Definition at line 67 of file trimesh.cpp.

References mNormal.

const shared_array< float > TriMesh::GetPos  )  const
 

returns the list of vertices

Definition at line 52 of file trimesh.cpp.

References mPos.

const shared_array< float > TriMesh::GetTexCoords  )  const
 

returns the list of texture coordinates

Definition at line 62 of file trimesh.cpp.

References mTexCoords.

int TriMesh::GetVertexCount  )  const
 

returns the number of stored vertices

Definition at line 57 of file trimesh.cpp.

References mVertexCount.

void TriMesh::SetName const std::string &  name  ) 
 

sets the name of this trimesh

Definition at line 93 of file trimesh.cpp.

References mName.

void oxygen::TriMesh::SetNormals boost::shared_array< float >  normal  ) 
 

sets the list of surface normals

void oxygen::TriMesh::SetPos boost::shared_array< float >  pos,
int  vertexCount
 

sets the list of vertices and their number

void oxygen::TriMesh::SetTexCoords boost::shared_array< float >  texCoords  ) 
 

sets the list of texture coordinates


Member Data Documentation

TFaces oxygen::TriMesh::mFaces [protected]
 

the list of faces

Definition at line 120 of file trimesh.h.

Referenced by AddFace(), and GetFaces().

std::string oxygen::TriMesh::mName [protected]
 

the unique name of this trimesh

Definition at line 105 of file trimesh.h.

Referenced by GetName(), and SetName().

boost::shared_array<float> oxygen::TriMesh::mNormal [protected]
 

the list of surface normals

Definition at line 117 of file trimesh.h.

Referenced by GetNormals().

boost::shared_array<float> oxygen::TriMesh::mPos [protected]
 

the list of vertices

Definition at line 111 of file trimesh.h.

Referenced by GetPos().

boost::shared_array<float> oxygen::TriMesh::mTexCoords [protected]
 

the list of texture coordinates

Definition at line 114 of file trimesh.h.

Referenced by GetTexCoords().

int oxygen::TriMesh::mVertexCount [protected]
 

the number of stored vertices

Definition at line 108 of file trimesh.h.

Referenced by GetVertexCount().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:44:40 2006 for rcssserver3d by  doxygen 1.4.4