Ogre Importer: Small fixes

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1228 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/5/head
jonathanklein 2012-03-21 08:49:46 +00:00
parent 5aeed46a25
commit 0e5ae5145b
3 changed files with 17 additions and 2 deletions

View File

@ -5,6 +5,13 @@
#include "OgreXmlHelper.hpp" #include "OgreXmlHelper.hpp"
#include "irrXMLWrapper.h" #include "irrXMLWrapper.h"
/// Ogre Importer TODO
/* - Read Vertex Colors
- Read multiple TexCoords
*/
namespace Assimp namespace Assimp
{ {
namespace Ogre namespace Ogre

View File

@ -193,7 +193,8 @@ void OgreImporter::ReadVertexBuffer(SubMesh &theSubMesh, XmlReader *Reader, unsi
||Reader->getNodeName()==string("position") ||Reader->getNodeName()==string("position")
||Reader->getNodeName()==string("normal") ||Reader->getNodeName()==string("normal")
||Reader->getNodeName()==string("tangent") ||Reader->getNodeName()==string("tangent")
||Reader->getNodeName()==string("texcoord")) ||Reader->getNodeName()==string("texcoord")
||Reader->getNodeName()==string("colour_diffuse"))
{ {
if(Reader->getNodeName()==string("vertex")) if(Reader->getNodeName()==string("vertex"))
XmlRead(Reader);//Read an attribute tag XmlRead(Reader);//Read an attribute tag
@ -242,6 +243,13 @@ void OgreImporter::ReadVertexBuffer(SubMesh &theSubMesh, XmlReader *Reader, unsi
continue;//don't read another line at the end of the loop continue;//don't read another line at the end of the loop
} }
//Color:
//TODO: actually save this data!
else if(Reader->getNodeName()==string("colour_diffuse"))
{
//do nothing, because we not yet support them
}
//Attribute could not be read //Attribute could not be read
else else
{ {

View File

@ -244,7 +244,7 @@ void OgreImporter::LoadSkeleton(std::string FileName, vector<Bone> &Bones, vecto
RotationAxis.y=GetAttribute<float>(SkeletonFile, "y"); RotationAxis.y=GetAttribute<float>(SkeletonFile, "y");
RotationAxis.z=GetAttribute<float>(SkeletonFile, "z"); RotationAxis.z=GetAttribute<float>(SkeletonFile, "z");
if(0==RotationAxis.x==RotationAxis.y==RotationAxis.z)//we have an invalid rotation axis if(0==RotationAxis.x && 0==RotationAxis.y && 0==RotationAxis.z)//we have an invalid rotation axis
{ {
RotationAxis.x=1.0f; RotationAxis.x=1.0f;
if(0!=RotationAngle)//if we don't rotate at all, the axis does not matter if(0!=RotationAngle)//if we don't rotate at all, the axis does not matter