Fixed 3DS, ASE, MD3 and Q3D orientation after Schrompf' recent changes to the RH-LH conversion.
WIP version of animation support in the 3DS loader. Still hoping to find out why the pivots aren't handled correctly ... Added first draft of a B3D loader provided by Mark Sibly. Moved DeterminePType-Step to ScenePreprocessor. Small LWO fix. Still texturing problems. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@231 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -48,7 +48,10 @@ void ScenePreprocessor::ProcessScene (aiScene* _scene)
|
||||
{
|
||||
scene = _scene;
|
||||
|
||||
// - nothing to do for meshes for the moment
|
||||
// Process all meshes
|
||||
for (unsigned int i = 0; i < scene->mNumMeshes;++i)
|
||||
ProcessMesh(scene->mMeshes[i]);
|
||||
|
||||
// - nothing to do for materials for the moment
|
||||
// - nothing to do for nodes for the moment
|
||||
// - nothing to do for textures for the moment
|
||||
@@ -60,6 +63,37 @@ void ScenePreprocessor::ProcessScene (aiScene* _scene)
|
||||
ProcessAnimation(scene->mAnimations[i]);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
void ScenePreprocessor::ProcessMesh (aiMesh* mesh)
|
||||
{
|
||||
// If the information which primitive types are there in the
|
||||
// mesh is currently not available, compute it.
|
||||
if (!mesh->mPrimitiveTypes)
|
||||
{
|
||||
for (unsigned int a = 0; a < mesh->mNumFaces; ++a)
|
||||
{
|
||||
aiFace& face = mesh->mFaces[a];
|
||||
switch (face.mNumIndices)
|
||||
{
|
||||
case 3u:
|
||||
mesh->mPrimitiveTypes |= aiPrimitiveType_TRIANGLE;
|
||||
break;
|
||||
|
||||
case 2u:
|
||||
mesh->mPrimitiveTypes |= aiPrimitiveType_LINE;
|
||||
break;
|
||||
|
||||
case 1u:
|
||||
mesh->mPrimitiveTypes |= aiPrimitiveType_POINT;
|
||||
break;
|
||||
|
||||
default:
|
||||
mesh->mPrimitiveTypes |= aiPrimitiveType_POLYGON;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
void ScenePreprocessor::ProcessAnimation (aiAnimation* anim)
|
||||
|
||||
Reference in New Issue
Block a user