|
Public Types |
typedef std::vector< Vertex * > | VertexList |
typedef std::vector< Vertex
* >::iterator | VertexListIterator |
typedef std::vector< MiniFace * > | FaceList |
typedef std::vector< MiniFace
* >::iterator | FaceListIterator |
typedef std::vector< UVCoord * > | UVCoordList |
typedef std::vector< UVCoord
* >::iterator | UVCoordListIterator |
typedef std::vector< Vertex * > | VertexNormalList |
typedef std::vector< Vertex
** >::iterator | VertexNormalListIterator |
typedef std::vector< VertexList * > | FrameList |
Public Member Functions |
| MiniMesh (void) |
| constructor
|
virtual | ~MiniMesh (void) |
| destructor
|
void | setFrameCount (int frameCount) |
| add the needed empty frames to the framelist
|
int | addVertex (float x, float y, float z, int frame=0) |
| add a vertex to a specific frame
|
void | setVertexNormal (int indexVertex, int indexNormal, int frame=0) |
| set the vertex normal for a specified vertex and a specific frame
|
int | addFace (int v1, int v2, int v3) |
| add a face to the facelist taking three indices of vertices (counter-clockwise direction)
|
int | addUVCoord (float u, float v) |
| add a UVCoordinate to the UVCoordList
|
int | addVertexNormal (float x, float y, float z) |
| add a vertex normal to the vertexnormallist
|
void | addFaceNormal (int face, float x, float y, float z) |
| add a face normal to the facenormalList
|
void | setTexCoordsForFace (int face, int stelle, int uvIndex) |
| set the texture coordinates for a specific vertex of a face
|
size_t | getVertexCount () |
size_t | getFaceCount () |
size_t | getUVCoordCount () |
size_t | getVertexNormalCount () |
size_t | getFrameCount () |
Vertex * | getVertex (int stelle, int frame) |
| get a pointer to the vertex at a specific frame at a specific position in the vertex list
|
MiniFace * | getFace (int stelle) |
| get a pointer to the face at a specific index in the face list
|
UVCoord * | getUVCoord (int stelle) |
| get a pointer to uv coordinates at a specific index in the uv list
|
Vertex * | getVertexNormals (int stelle, int frame) |
| get a pointer to the vertex normals of a vertex at a specific frame
|
Vertex * | getFaceNormals (int faceIndex) |
| get a pointer to the face normals of a face
|
void | createDisplayListFrame0 () |
void | flipYUV () |
| flip the y-coordinate of the uv-coordinates
|
void | doubleSided (bool) |
| make the mesh doublesided
|
void | showNormals (bool) |
| show the normals or not
|
void | switchTextureOnOff () |
void | computeFaceNormals (int frameNumber=0) |
| compute the face normals at a specific frame framenumber
|
void | computeAllFaceNormals () |
void | computeVertexNormals (int frameNumber=0) |
void | computeAllVertexNormals () |
void | init () |
| initialize the minimesh, create display list for static objects, print useful information
|
void | render () |
| call rendering method for static meshes and animated meshes
|
void | playAnimation (bool) |
| start/stop the animation
|
void | setFrameRate (float newFrameRate) |
| set the framerate of the animation
|
void | getNextFrame () |
| get the next frame of the animation
|
void | jumpToFrame (int framenumber) |
| jump to a specific frame of the animation
|
void | setTextureCount (int textureCount) |
| set the number of textures for this mesh
|
void | stopAnim () |
void | startAnim () |
Public Attributes |
unsigned int | playFrame |
FrameList | frames |
Motion * | mPtr |
Private Member Functions |
void | prepareAnim (int framenumber) |
| write necessary openGL commands to render an animated mesh, kann momentan nur EINE textur
|
void | renderStatic () |
| write necessary openGL commands to render a static mesh
|
void | renderAnim () |
| render the animated mesh
|
Private Attributes |
bool | stop |
float | frameInt |
VertexList | Frame0 |
FaceList | fList |
UVCoordList | uvList |
VertexNormalList | vNormalList |
std::vector< UINT32 > | displayAnim |
bool | texture |
bool | faceNormals |
bool | showN |
bool | doubleS |
bool | flipY_UV |
bool | playAnim |
float | frameInterpolator |
float | frameRate |
int | textures |
unsigned int | meshListID |
minimal mesh structure, optimized for md2 models incl. animation. supports only triangles. allows to set, get and render vertices, faces, texture coordinates, face normals and vertex normals. Also supports more frames and allows to jump to a specific frame or to the next frame