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:
aramis_acg
2008-11-04 20:41:11 +00:00
parent 195d9a9cb1
commit 7c50899481
19 changed files with 732 additions and 129 deletions

View File

@@ -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)