Added a mNumVertices property to aiAnimMesh as discussed with Alex on ICQ.

It is intended to make the length of the arrays in aiAnimMesh accessible even if the associated aiMesh is not known, e.g. in language bindings. Once the data structure is actually used inside Assimp, it could be set for all aiAnimMeshes from aiMesh::NumVertices in the Assimp::Importer after everything else has been completed.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@768 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
klickverbot 2010-07-07 22:01:29 +00:00
parent 91d01d72c6
commit af3c5a8404
1 changed files with 11 additions and 1 deletions

View File

@ -317,7 +317,7 @@ enum aiPrimitiveType
struct aiAnimMesh struct aiAnimMesh
{ {
/** Replacement for aiMesh::mVertices. If this array is non-NULL, /** Replacement for aiMesh::mVertices. If this array is non-NULL,
* it *must* contain aiMesh::mNumVertices entries. The corresponding * it *must* contain mNumVertices entries. The corresponding
* array in the host mesh must be non-NULL as well - animation * array in the host mesh must be non-NULL as well - animation
* meshes may neither add or nor remove vertex components (if * meshes may neither add or nor remove vertex components (if
* a replacement array is NULL and the corresponding source * a replacement array is NULL and the corresponding source
@ -339,6 +339,16 @@ struct aiAnimMesh
/** Replacement for aiMesh::mTextureCoords */ /** Replacement for aiMesh::mTextureCoords */
C_STRUCT aiVector3D* mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS]; C_STRUCT aiVector3D* mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
/** The number of vertices in the aiAnimMesh, and thus the length of all
* the member arrays.
*
* This has always the same value as the mNumVertices property in the
* corresponding aiMesh. It is duplicated here merely to make the length
* of the member arrays accessible even if the aiMesh is not known, e.g.
* from language bindings.
*/
unsigned int mNumVertices;
#ifdef __cplusplus #ifdef __cplusplus
aiAnimMesh() aiAnimMesh()