' B3DImporter.cpp
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@330 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
8388877ed7
commit
2b1f0cbac0
|
@ -117,6 +117,12 @@ void B3DImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
|
||||||
|
|
||||||
//create root node
|
//create root node
|
||||||
aiNode *node=new aiNode( "root" );
|
aiNode *node=new aiNode( "root" );
|
||||||
|
node->mTransformation=aiMatrix4x4(
|
||||||
|
1,0,0,0,
|
||||||
|
0,0,1,0,
|
||||||
|
0,1,0,0,
|
||||||
|
0,0,0,1 );
|
||||||
|
|
||||||
node->mNumMeshes=_meshes.size();
|
node->mNumMeshes=_meshes.size();
|
||||||
node->mMeshes=new unsigned[_meshes.size()];
|
node->mMeshes=new unsigned[_meshes.size()];
|
||||||
for( unsigned i=0;i<_meshes.size();++i ){
|
for( unsigned i=0;i<_meshes.size();++i ){
|
||||||
|
@ -291,11 +297,9 @@ void B3DImporter::ReadVRTS(){
|
||||||
Vertex vert;
|
Vertex vert;
|
||||||
|
|
||||||
vert.position=ReadVec3();
|
vert.position=ReadVec3();
|
||||||
std::swap( vert.position.y,vert.position.z );
|
|
||||||
|
|
||||||
if( _vertFlags & 1 ){
|
if( _vertFlags & 1 ){
|
||||||
vert.normal=ReadVec3();
|
vert.normal=ReadVec3();
|
||||||
std::swap( vert.normal.y,vert.normal.z );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( _vertFlags & 2 ){
|
if( _vertFlags & 2 ){
|
||||||
|
@ -383,10 +387,6 @@ void B3DImporter::ReadNODE(){
|
||||||
Vec3 scale=ReadVec3();
|
Vec3 scale=ReadVec3();
|
||||||
Vec4 rot=ReadVec4();
|
Vec4 rot=ReadVec4();
|
||||||
|
|
||||||
std::swap( trans.y,trans.z );
|
|
||||||
std::swap( scale.y,scale.z );
|
|
||||||
//do something to rot?!?
|
|
||||||
|
|
||||||
while( ChunkSize() ){
|
while( ChunkSize() ){
|
||||||
string t=ReadChunk();
|
string t=ReadChunk();
|
||||||
if( t=="MESH" ){
|
if( t=="MESH" ){
|
||||||
|
|
Loading…
Reference in New Issue