From ed42533cce6b76feb4d433aa8beb02308d9ec85e Mon Sep 17 00:00:00 2001 From: marksibly Date: Fri, 30 Jan 2009 00:07:09 +0000 Subject: [PATCH] Converted output to right handed. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@324 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/B3DImporter.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/B3DImporter.cpp b/code/B3DImporter.cpp index fdbeedf1f..72da7cac4 100644 --- a/code/B3DImporter.cpp +++ b/code/B3DImporter.cpp @@ -285,9 +285,11 @@ void B3DImporter::ReadVRTS(){ Vertex vert; vert.position=ReadVec3(); + std::swap( vert.position.y,vert.position.z ); if( vertFlags & 1 ){ vert.normal=ReadVec3(); + std::swap( vert.normal.y,vert.normal.z ); } if( vertFlags & 2 ){ @@ -299,6 +301,7 @@ void B3DImporter::ReadVRTS(){ for( int j=0;jmNumIndices=3; unsigned *ip=face->mIndices=new unsigned[3]; + int v[3]; + v[0]=ReadInt(); + v[2]=ReadInt(); + v[1]=ReadInt(); for( unsigned j=0;j<3;++j ){ - int k=ReadInt(); + int k=v[j];//ReadInt(); const Vertex &v=_vertices[k]; memcpy( mv++,&v.position.x,12 ); memcpy( mn++,&v.normal.x,12 ); @@ -365,6 +372,7 @@ void B3DImporter::ReadNODE(){ string name=ReadString(); Vec3 trans=ReadVec3(); + std::swap( trans.y,trans.z ); Vec3 scale=ReadVec3(); Vec4 rot=ReadVec4();