sgMesh Class Reference

#include <sgMesh.h>

Inheritance diagram for sgMesh:
sgBase

List of all members.

Public Member Functions

 ~sgMesh ()
void prepareAnimation ()
void setAnimation (const char *name, float percent)
void calculateNormals ()
void calculateFaceNormal (sgVertex *vertex, sgVertex *neighbour_a, sgVertex *neighbour_b)
void invertTexCoordsX ()
void invertTexCoordsY ()

Public Attributes

unsigned int vertexformat
unsigned int vertexnum
sgVertexvertices
unsigned int indexnum
unsigned short * indices

Detailed Description

Mesh class. This is the mesh format.


Constructor & Destructor Documentation

sgMesh::~sgMesh (  ) 

Deconstructor. Frees all memory allocated by this class.


Member Function Documentation

void sgMesh::calculateFaceNormal ( sgVertex vertex,
sgVertex neighbour_a,
sgVertex neighbour_b 
)

Calculate face normal. Calculates the normal of a layer, streched between the three given vertices.

Parameters:
vertex a first vertex
neighbour_a a second vertex
neighbour_b a third vertex
void sgMesh::calculateNormals (  ) 

Calculate normals. Calculates new normals for the mesh, which is needed for correct shading after the mesh was manipulated.

void sgMesh::invertTexCoordsX (  ) 

Invert texcoords X. Inverts the texture coordinates along the x axis.

void sgMesh::invertTexCoordsY (  ) 

Invert texcoords Y. Inverts the texture coordinates along the y axis.

void sgMesh::prepareAnimation (  ) 

Prepare for animation. Transforms the vertexpositions into their bones space.

void sgMesh::setAnimation ( const char *  name,
float  percent 
)

Set animation. Sets to a given position within the animation with the specified name.

Parameters:
name name of the animation
percent position within the animation in percent (0-100)

Member Data Documentation

unsigned int sgMesh::indexnum

Index number. The number of the meshs indices.

unsigned short* sgMesh::indices

Index array. Pointer to the meshs array of indices.

unsigned int sgMesh::vertexformat

Vertex format. The format of the vertices of this mesh (ranging from 0 to 3).

unsigned int sgMesh::vertexnum

Vertex number. The number of vertices, this mesh consists of.

Vertex array. Pointer to the meshs array of vertices.


The documentation for this class was generated from the following files:
Generated on Thu Jun 3 13:31:04 2010 for iSDGE by  doxygen 1.6.3