Further work on the IRR, AC, LWS loaders. Further work on the - still unfinished - OptimizeGraph step. SceneCombiner works now properly in all cases I tested yet.
Added missing 'typename' in Colladaparser.h First implementation of spherical and cylindrical mapping, already in use for IRR and LWO models. For the latter the coordinate system is not yet correct. Moved vec2d to a separate header and added operators similar to vec3. Added plane and ray helper classes. Just the data is wrapped, no operators required for the moment. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@249 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -238,11 +238,18 @@ aiMaterial* IrrlichtBase::ParseMaterial(unsigned int& matFlags)
|
||||
ColorFromARGBPacked(prop.value,clr);
|
||||
mat->AddProperty(&clr,1,AI_MATKEY_COLOR_SPECULAR);
|
||||
}
|
||||
|
||||
// NOTE: The 'emissive' property causes problems. It is
|
||||
// often != 0, even if there is obviously no light
|
||||
// emitted by the described surface. In fact I think
|
||||
// IRRLICHT ignores this property, too.
|
||||
#if 0
|
||||
else if (prop.name == "Emissive")
|
||||
{
|
||||
ColorFromARGBPacked(prop.value,clr);
|
||||
mat->AddProperty(&clr,1,AI_MATKEY_COLOR_EMISSIVE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
// Float properties
|
||||
else if (!ASSIMP_stricmp(reader->getNodeName(),"float"))
|
||||
@@ -746,24 +753,22 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
|
||||
sz = fast_atof_move(sz,(float&)temp.x);
|
||||
SkipSpaces(&sz);
|
||||
|
||||
sz = fast_atof_move(sz,(float&)temp.z);
|
||||
SkipSpaces(&sz);
|
||||
|
||||
sz = fast_atof_move(sz,(float&)temp.y);
|
||||
SkipSpaces(&sz);
|
||||
temp.y *= -1.0f;
|
||||
|
||||
sz = fast_atof_move(sz,(float&)temp.z);
|
||||
SkipSpaces(&sz);
|
||||
curVertices.push_back(temp);
|
||||
|
||||
// Read the vertex normals
|
||||
sz = fast_atof_move(sz,(float&)temp.x);
|
||||
SkipSpaces(&sz);
|
||||
|
||||
sz = fast_atof_move(sz,(float&)temp.z);
|
||||
SkipSpaces(&sz);
|
||||
|
||||
sz = fast_atof_move(sz,(float&)temp.y);
|
||||
SkipSpaces(&sz);
|
||||
temp.y *= -1.0f;
|
||||
|
||||
sz = fast_atof_move(sz,(float&)temp.z);
|
||||
SkipSpaces(&sz);
|
||||
curNormals.push_back(temp);
|
||||
|
||||
// read the vertex colors
|
||||
@@ -953,6 +958,10 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
|
||||
for (unsigned int i = 0; i < pScene->mNumMeshes;++i)
|
||||
pScene->mRootNode->mMeshes[i] = i;
|
||||
|
||||
// transformation matrix to convert from IRRMESH to ASSIMP coordinates
|
||||
pScene->mRootNode->mTransformation *= aiMatrix4x4(
|
||||
1.0f, 0.0f, 0.0f, 0.f, 0.0f, 0.0f, -1.0f, 0.f, 0.0f, 1.0f, 0.0f, 0.f, 0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
delete reader;
|
||||
AI_DEBUG_INVALIDATE_PTR(reader);
|
||||
}
|
||||
Reference in New Issue
Block a user