#include <sgMesh.h>
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 |
| sgVertex * | vertices |
| unsigned int | indexnum |
| unsigned short * | indices |
Mesh class. This is the mesh format.
| sgMesh::~sgMesh | ( | ) |
Deconstructor. Frees all memory allocated by this class.
| 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.
| 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.
| name | name of the animation | |
| percent | position within the animation in percent (0-100) |
| 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.
1.6.3