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

Mesh Class Reference

Store all the information needed for a mesh. More...

#include <Mesh.h>

List of all members.

Public Types

typedef std::list< Vertex
* >::iterator 
vertexIter
typedef std::list< Face
* >::iterator 
faceIter
typedef std::list< UVCoords
* >::iterator 
uvIter

Public Member Functions

 Mesh (void)
 constructor
virtual ~Mesh (void)
 destructor
faceIter addFace (Vertex *v1, Vertex *v2, Vertex *v3)
 add a Face with pointers to 3 vertices (triangle) to the faceList
faceIter addFace (Vertex *v1, Vertex *v2, Vertex *v3, Vertex *v4)
 add a Face with pointers to 4 vertices (quad) to the faceList
faceIter addFace (std::list< Vertex * > li)
 add a Face with a list of pointers to vertices (poly) to the faceList
vertexIter addVertex (float x_new, float y_new, float z_new)
 add a Vertex with the float coordinates to the vertexlist
uvIter addUVCoord (float x_new, float y_new)
bool switchTextureOnOff ()
faceIter getFirstFace ()
 get the Iterator to the first face in the faceList
vertexIter getFirstVertex ()
 get the Iterator to the first vertex in the vertexList
uvIter getFirstUV ()
void deleteFace (faceIter)
 delete the face of fIter from the faceList
void deleteVertex (vertexIter)
 delete the vertex of vIter from the vertexList
void outputOpenGL ()
 show the mesh with openGL commands
void outputOpenGLPoints ()
 show the vertices of the mesh with openGL commands

Protected Attributes

std::list< Vertex * > vertexList
std::list< Face * > faceList
std::list< UVCoords * > uvList
bool texture


Detailed Description

Store all the information needed for a mesh.

Store the information for vertices and faces that are needed to display the mesh correctly. These are stored in vertexList and faceList. Also functions for displaying the mesh in openGL are written.


Member Typedef Documentation

typedef std::list<Face*>::iterator Mesh::faceIter
 

typedef std::list<UVCoords*>::iterator Mesh::uvIter
 

typedef std::list<Vertex*>::iterator Mesh::vertexIter
 


Constructor & Destructor Documentation

Mesh::Mesh void   ) 
 

constructor

Mesh::~Mesh void   )  [virtual]
 

destructor


Member Function Documentation

Mesh::faceIter Mesh::addFace std::list< Vertex * >  li  ) 
 

add a Face with a list of pointers to vertices (poly) to the faceList

Parameters:
list of vertex pointers
Returns:
Iterator of the faceList for the added face

Mesh::faceIter Mesh::addFace Vertex v1,
Vertex v2,
Vertex v3,
Vertex v4
 

add a Face with pointers to 4 vertices (quad) to the faceList

Parameters:
pointer to the first vertex (against clock-direction)
pointer to the second vertex
pointer to the third vertex
pointer to the fourth vertex
Returns:
Iterator of the faceList for the added face

Mesh::faceIter Mesh::addFace Vertex v1,
Vertex v2,
Vertex v3
 

add a Face with pointers to 3 vertices (triangle) to the faceList

Parameters:
pointer to the first vertex (against clock-direction)
pointer to the second vertex
pointer to the third vertex
Returns:
Iterator of the faceList for the added face

Mesh::uvIter Mesh::addUVCoord float  x_new,
float  y_new
 

Mesh::vertexIter Mesh::addVertex float  x,
float  y,
float  z
 

add a Vertex with the float coordinates to the vertexlist

Parameters:
x coordinate
y coordinate
z coordinate
Returns:
Iterator of the vertexList for the added vertex

void Mesh::deleteFace Mesh::faceIter  fIter  ) 
 

delete the face of fIter from the faceList

Parameters:
Iterator to the face to be deleted

void Mesh::deleteVertex Mesh::vertexIter  vIter  ) 
 

delete the vertex of vIter from the vertexList

Parameters:
Iterator to the vertex to be deleted

Mesh::faceIter Mesh::getFirstFace  ) 
 

get the Iterator to the first face in the faceList

Returns:
Iterator to the first face of the facelist

uvIter Mesh::getFirstUV  ) 
 

Mesh::vertexIter Mesh::getFirstVertex  ) 
 

get the Iterator to the first vertex in the vertexList

Returns:
Iterator to the first vertex of the vertexList

void Mesh::outputOpenGL  ) 
 

show the mesh with openGL commands

void Mesh::outputOpenGLPoints  ) 
 

show the vertices of the mesh with openGL commands

bool Mesh::switchTextureOnOff  ) 
 


Member Data Documentation

std::list<Face*> Mesh::faceList [protected]
 

bool Mesh::texture [protected]
 

std::list<UVCoords*> Mesh::uvList [protected]
 

std::list<Vertex*> Mesh::vertexList [protected]
 


The documentation for this class was generated from the following files:
Generated on Mon Jan 24 17:42:33 2005 for Loud and Proud by doxygen 1.3.8