Q3DLoader.cpp 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. /*
  2. ---------------------------------------------------------------------------
  3. Open Asset Import Library (assimp)
  4. ---------------------------------------------------------------------------
  5. Copyright (c) 2006-2018, assimp team
  6. All rights reserved.
  7. Redistribution and use of this software in source and binary forms,
  8. with or without modification, are permitted provided that the following
  9. conditions are met:
  10. * Redistributions of source code must retain the above
  11. copyright notice, this list of conditions and the
  12. following disclaimer.
  13. * Redistributions in binary form must reproduce the above
  14. copyright notice, this list of conditions and the
  15. following disclaimer in the documentation and/or other
  16. materials provided with the distribution.
  17. * Neither the name of the assimp team, nor the names of its
  18. contributors may be used to endorse or promote products
  19. derived from this software without specific prior
  20. written permission of the assimp team.
  21. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  27. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  28. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. ---------------------------------------------------------------------------
  33. */
  34. /** @file Q3DLoader.cpp
  35. * @brief Implementation of the Q3D importer class
  36. */
  37. #ifndef ASSIMP_BUILD_NO_Q3D_IMPORTER
  38. // internal headers
  39. #include "Q3DLoader.h"
  40. #include <assimp/StreamReader.h>
  41. #include <assimp/fast_atof.h>
  42. #include <assimp/IOSystem.hpp>
  43. #include <assimp/DefaultLogger.hpp>
  44. #include <assimp/scene.h>
  45. #include <assimp/importerdesc.h>
  46. using namespace Assimp;
  47. static const aiImporterDesc desc = {
  48. "Quick3D Importer",
  49. "",
  50. "",
  51. "http://www.quick3d.com/",
  52. aiImporterFlags_SupportBinaryFlavour,
  53. 0,
  54. 0,
  55. 0,
  56. 0,
  57. "q3o q3s"
  58. };
  59. // ------------------------------------------------------------------------------------------------
  60. // Constructor to be privately used by Importer
  61. Q3DImporter::Q3DImporter()
  62. {}
  63. // ------------------------------------------------------------------------------------------------
  64. // Destructor, private as well
  65. Q3DImporter::~Q3DImporter()
  66. {}
  67. // ------------------------------------------------------------------------------------------------
  68. // Returns whether the class can handle the format of the given file.
  69. bool Q3DImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
  70. {
  71. const std::string extension = GetExtension(pFile);
  72. if (extension == "q3s" || extension == "q3o")
  73. return true;
  74. else if (!extension.length() || checkSig) {
  75. if (!pIOHandler)
  76. return true;
  77. const char* tokens[] = {"quick3Do","quick3Ds"};
  78. return SearchFileHeaderForToken(pIOHandler,pFile,tokens,2);
  79. }
  80. return false;
  81. }
  82. // ------------------------------------------------------------------------------------------------
  83. const aiImporterDesc* Q3DImporter::GetInfo () const
  84. {
  85. return &desc;
  86. }
  87. // ------------------------------------------------------------------------------------------------
  88. // Imports the given file into the given scene structure.
  89. void Q3DImporter::InternReadFile( const std::string& pFile,
  90. aiScene* pScene, IOSystem* pIOHandler)
  91. {
  92. StreamReaderLE stream(pIOHandler->Open(pFile,"rb"));
  93. // The header is 22 bytes large
  94. if (stream.GetRemainingSize() < 22)
  95. throw DeadlyImportError("File is either empty or corrupt: " + pFile);
  96. // Check the file's signature
  97. if (ASSIMP_strincmp( (const char*)stream.GetPtr(), "quick3Do", 8 ) &&
  98. ASSIMP_strincmp( (const char*)stream.GetPtr(), "quick3Ds", 8 ))
  99. {
  100. throw DeadlyImportError("Not a Quick3D file. Signature string is: " +
  101. std::string((const char*)stream.GetPtr(),8));
  102. }
  103. // Print the file format version
  104. ASSIMP_LOG_INFO_F("Quick3D File format version: ",
  105. std::string(&((const char*)stream.GetPtr())[8],2));
  106. // ... an store it
  107. char major = ((const char*)stream.GetPtr())[8];
  108. char minor = ((const char*)stream.GetPtr())[9];
  109. stream.IncPtr(10);
  110. unsigned int numMeshes = (unsigned int)stream.GetI4();
  111. unsigned int numMats = (unsigned int)stream.GetI4();
  112. unsigned int numTextures = (unsigned int)stream.GetI4();
  113. std::vector<Material> materials;
  114. materials.reserve(numMats);
  115. std::vector<Mesh> meshes;
  116. meshes.reserve(numMeshes);
  117. // Allocate the scene root node
  118. pScene->mRootNode = new aiNode();
  119. aiColor3D fgColor (0.6f,0.6f,0.6f);
  120. // Now read all file chunks
  121. while (true)
  122. {
  123. if (stream.GetRemainingSize() < 1)break;
  124. char c = stream.GetI1();
  125. switch (c)
  126. {
  127. // Meshes chunk
  128. case 'm':
  129. {
  130. for (unsigned int quak = 0; quak < numMeshes; ++quak)
  131. {
  132. meshes.push_back(Mesh());
  133. Mesh& mesh = meshes.back();
  134. // read all vertices
  135. unsigned int numVerts = (unsigned int)stream.GetI4();
  136. if (!numVerts)
  137. throw DeadlyImportError("Quick3D: Found mesh with zero vertices");
  138. std::vector<aiVector3D>& verts = mesh.verts;
  139. verts.resize(numVerts);
  140. for (unsigned int i = 0; i < numVerts;++i)
  141. {
  142. verts[i].x = stream.GetF4();
  143. verts[i].y = stream.GetF4();
  144. verts[i].z = stream.GetF4();
  145. }
  146. // read all faces
  147. numVerts = (unsigned int)stream.GetI4();
  148. if (!numVerts)
  149. throw DeadlyImportError("Quick3D: Found mesh with zero faces");
  150. std::vector<Face >& faces = mesh.faces;
  151. faces.reserve(numVerts);
  152. // number of indices
  153. for (unsigned int i = 0; i < numVerts;++i)
  154. {
  155. faces.push_back(Face(stream.GetI2()) );
  156. if (faces.back().indices.empty())
  157. throw DeadlyImportError("Quick3D: Found face with zero indices");
  158. }
  159. // indices
  160. for (unsigned int i = 0; i < numVerts;++i)
  161. {
  162. Face& vec = faces[i];
  163. for (unsigned int a = 0; a < (unsigned int)vec.indices.size();++a)
  164. vec.indices[a] = stream.GetI4();
  165. }
  166. // material indices
  167. for (unsigned int i = 0; i < numVerts;++i)
  168. {
  169. faces[i].mat = (unsigned int)stream.GetI4();
  170. }
  171. // read all normals
  172. numVerts = (unsigned int)stream.GetI4();
  173. std::vector<aiVector3D>& normals = mesh.normals;
  174. normals.resize(numVerts);
  175. for (unsigned int i = 0; i < numVerts;++i)
  176. {
  177. normals[i].x = stream.GetF4();
  178. normals[i].y = stream.GetF4();
  179. normals[i].z = stream.GetF4();
  180. }
  181. numVerts = (unsigned int)stream.GetI4();
  182. if (numTextures && numVerts)
  183. {
  184. // read all texture coordinates
  185. std::vector<aiVector3D>& uv = mesh.uv;
  186. uv.resize(numVerts);
  187. for (unsigned int i = 0; i < numVerts;++i)
  188. {
  189. uv[i].x = stream.GetF4();
  190. uv[i].y = stream.GetF4();
  191. }
  192. // UV indices
  193. for (unsigned int i = 0; i < (unsigned int)faces.size();++i)
  194. {
  195. Face& vec = faces[i];
  196. for (unsigned int a = 0; a < (unsigned int)vec.indices.size();++a)
  197. {
  198. vec.uvindices[a] = stream.GetI4();
  199. if (!i && !a)
  200. mesh.prevUVIdx = vec.uvindices[a];
  201. else if (vec.uvindices[a] != mesh.prevUVIdx)
  202. mesh.prevUVIdx = UINT_MAX;
  203. }
  204. }
  205. }
  206. // we don't need the rest, but we need to get to the next chunk
  207. stream.IncPtr(36);
  208. if (minor > '0' && major == '3')
  209. stream.IncPtr(mesh.faces.size());
  210. }
  211. // stream.IncPtr(4); // unknown value here
  212. }
  213. break;
  214. // materials chunk
  215. case 'c':
  216. for (unsigned int i = 0; i < numMats; ++i)
  217. {
  218. materials.push_back(Material());
  219. Material& mat = materials.back();
  220. // read the material name
  221. while (( c = stream.GetI1()))
  222. mat.name.data[mat.name.length++] = c;
  223. // add the terminal character
  224. mat.name.data[mat.name.length] = '\0';
  225. // read the ambient color
  226. mat.ambient.r = stream.GetF4();
  227. mat.ambient.g = stream.GetF4();
  228. mat.ambient.b = stream.GetF4();
  229. // read the diffuse color
  230. mat.diffuse.r = stream.GetF4();
  231. mat.diffuse.g = stream.GetF4();
  232. mat.diffuse.b = stream.GetF4();
  233. // read the ambient color
  234. mat.specular.r = stream.GetF4();
  235. mat.specular.g = stream.GetF4();
  236. mat.specular.b = stream.GetF4();
  237. // read the transparency
  238. mat.transparency = stream.GetF4();
  239. // unknown value here
  240. // stream.IncPtr(4);
  241. // FIX: it could be the texture index ...
  242. mat.texIdx = (unsigned int)stream.GetI4();
  243. }
  244. break;
  245. // texture chunk
  246. case 't':
  247. pScene->mNumTextures = numTextures;
  248. if (!numTextures)break;
  249. pScene->mTextures = new aiTexture*[pScene->mNumTextures];
  250. // to make sure we won't crash if we leave through an exception
  251. ::memset(pScene->mTextures,0,sizeof(void*)*pScene->mNumTextures);
  252. for (unsigned int i = 0; i < pScene->mNumTextures; ++i)
  253. {
  254. aiTexture* tex = pScene->mTextures[i] = new aiTexture();
  255. // skip the texture name
  256. while (stream.GetI1());
  257. // read texture width and height
  258. tex->mWidth = (unsigned int)stream.GetI4();
  259. tex->mHeight = (unsigned int)stream.GetI4();
  260. if (!tex->mWidth || !tex->mHeight)
  261. throw DeadlyImportError("Quick3D: Invalid texture. Width or height is zero");
  262. unsigned int mul = tex->mWidth * tex->mHeight;
  263. aiTexel* begin = tex->pcData = new aiTexel[mul];
  264. aiTexel* const end = & begin [mul];
  265. for (;begin != end; ++begin)
  266. {
  267. begin->r = stream.GetI1();
  268. begin->g = stream.GetI1();
  269. begin->b = stream.GetI1();
  270. begin->a = 0xff;
  271. }
  272. }
  273. break;
  274. // scene chunk
  275. case 's':
  276. {
  277. // skip position and rotation
  278. stream.IncPtr(12);
  279. for (unsigned int i = 0; i < 4;++i)
  280. for (unsigned int a = 0; a < 4;++a)
  281. pScene->mRootNode->mTransformation[i][a] = stream.GetF4();
  282. stream.IncPtr(16);
  283. // now setup a single camera
  284. pScene->mNumCameras = 1;
  285. pScene->mCameras = new aiCamera*[1];
  286. aiCamera* cam = pScene->mCameras[0] = new aiCamera();
  287. cam->mPosition.x = stream.GetF4();
  288. cam->mPosition.y = stream.GetF4();
  289. cam->mPosition.z = stream.GetF4();
  290. cam->mName.Set("Q3DCamera");
  291. // skip eye rotation for the moment
  292. stream.IncPtr(12);
  293. // read the default material color
  294. fgColor .r = stream.GetF4();
  295. fgColor .g = stream.GetF4();
  296. fgColor .b = stream.GetF4();
  297. // skip some unimportant properties
  298. stream.IncPtr(29);
  299. // setup a single point light with no attenuation
  300. pScene->mNumLights = 1;
  301. pScene->mLights = new aiLight*[1];
  302. aiLight* light = pScene->mLights[0] = new aiLight();
  303. light->mName.Set("Q3DLight");
  304. light->mType = aiLightSource_POINT;
  305. light->mAttenuationConstant = 1;
  306. light->mAttenuationLinear = 0;
  307. light->mAttenuationQuadratic = 0;
  308. light->mColorDiffuse.r = stream.GetF4();
  309. light->mColorDiffuse.g = stream.GetF4();
  310. light->mColorDiffuse.b = stream.GetF4();
  311. light->mColorSpecular = light->mColorDiffuse;
  312. // We don't need the rest, but we need to know where this chunk ends.
  313. unsigned int temp = (unsigned int)(stream.GetI4() * stream.GetI4());
  314. // skip the background file name
  315. while (stream.GetI1());
  316. // skip background texture data + the remaining fields
  317. stream.IncPtr(temp*3 + 20); // 4 bytes of unknown data here
  318. // TODO
  319. goto outer;
  320. }
  321. break;
  322. default:
  323. throw DeadlyImportError("Quick3D: Unknown chunk");
  324. break;
  325. };
  326. }
  327. outer:
  328. // If we have no mesh loaded - break here
  329. if (meshes.empty())
  330. throw DeadlyImportError("Quick3D: No meshes loaded");
  331. // If we have no materials loaded - generate a default mat
  332. if (materials.empty())
  333. {
  334. ASSIMP_LOG_INFO("Quick3D: No material found, generating one");
  335. materials.push_back(Material());
  336. materials.back().diffuse = fgColor ;
  337. }
  338. // find out which materials we'll need
  339. typedef std::pair<unsigned int, unsigned int> FaceIdx;
  340. typedef std::vector< FaceIdx > FaceIdxArray;
  341. FaceIdxArray* fidx = new FaceIdxArray[materials.size()];
  342. unsigned int p = 0;
  343. for (std::vector<Mesh>::iterator it = meshes.begin(), end = meshes.end();
  344. it != end; ++it,++p)
  345. {
  346. unsigned int q = 0;
  347. for (std::vector<Face>::iterator fit = (*it).faces.begin(), fend = (*it).faces.end();
  348. fit != fend; ++fit,++q)
  349. {
  350. if ((*fit).mat >= materials.size())
  351. {
  352. ASSIMP_LOG_WARN("Quick3D: Material index overflow");
  353. (*fit).mat = 0;
  354. }
  355. if (fidx[(*fit).mat].empty())++pScene->mNumMeshes;
  356. fidx[(*fit).mat].push_back( FaceIdx(p,q) );
  357. }
  358. }
  359. pScene->mNumMaterials = pScene->mNumMeshes;
  360. pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials];
  361. pScene->mMeshes = new aiMesh*[pScene->mNumMaterials];
  362. for (unsigned int i = 0, real = 0; i < (unsigned int)materials.size(); ++i)
  363. {
  364. if (fidx[i].empty())continue;
  365. // Allocate a mesh and a material
  366. aiMesh* mesh = pScene->mMeshes[real] = new aiMesh();
  367. aiMaterial* mat = new aiMaterial();
  368. pScene->mMaterials[real] = mat;
  369. mesh->mMaterialIndex = real;
  370. // Build the output material
  371. Material& srcMat = materials[i];
  372. mat->AddProperty(&srcMat.diffuse, 1,AI_MATKEY_COLOR_DIFFUSE);
  373. mat->AddProperty(&srcMat.specular, 1,AI_MATKEY_COLOR_SPECULAR);
  374. mat->AddProperty(&srcMat.ambient, 1,AI_MATKEY_COLOR_AMBIENT);
  375. // NOTE: Ignore transparency for the moment - it seems
  376. // unclear how to interpret the data
  377. #if 0
  378. if (!(minor > '0' && major == '3'))
  379. srcMat.transparency = 1.0f - srcMat.transparency;
  380. mat->AddProperty(&srcMat.transparency, 1, AI_MATKEY_OPACITY);
  381. #endif
  382. // add shininess - Quick3D seems to use it ins its viewer
  383. srcMat.transparency = 16.f;
  384. mat->AddProperty(&srcMat.transparency, 1, AI_MATKEY_SHININESS);
  385. int m = (int)aiShadingMode_Phong;
  386. mat->AddProperty(&m, 1, AI_MATKEY_SHADING_MODEL);
  387. if (srcMat.name.length)
  388. mat->AddProperty(&srcMat.name,AI_MATKEY_NAME);
  389. // Add a texture
  390. if (srcMat.texIdx < pScene->mNumTextures || real < pScene->mNumTextures)
  391. {
  392. srcMat.name.data[0] = '*';
  393. srcMat.name.length = ASSIMP_itoa10(&srcMat.name.data[1],1000,
  394. (srcMat.texIdx < pScene->mNumTextures ? srcMat.texIdx : real));
  395. mat->AddProperty(&srcMat.name,AI_MATKEY_TEXTURE_DIFFUSE(0));
  396. }
  397. mesh->mNumFaces = (unsigned int)fidx[i].size();
  398. aiFace* faces = mesh->mFaces = new aiFace[mesh->mNumFaces];
  399. // Now build the output mesh. First find out how many
  400. // vertices we'll need
  401. for (FaceIdxArray::const_iterator it = fidx[i].begin(),end = fidx[i].end();
  402. it != end; ++it)
  403. {
  404. mesh->mNumVertices += (unsigned int)meshes[(*it).first].faces[
  405. (*it).second].indices.size();
  406. }
  407. aiVector3D* verts = mesh->mVertices = new aiVector3D[mesh->mNumVertices];
  408. aiVector3D* norms = mesh->mNormals = new aiVector3D[mesh->mNumVertices];
  409. aiVector3D* uv;
  410. if (real < pScene->mNumTextures)
  411. {
  412. uv = mesh->mTextureCoords[0] = new aiVector3D[mesh->mNumVertices];
  413. mesh->mNumUVComponents[0] = 2;
  414. }
  415. else uv = NULL;
  416. // Build the final array
  417. unsigned int cnt = 0;
  418. for (FaceIdxArray::const_iterator it = fidx[i].begin(),end = fidx[i].end();
  419. it != end; ++it, ++faces)
  420. {
  421. Mesh& m = meshes[(*it).first];
  422. Face& face = m.faces[(*it).second];
  423. faces->mNumIndices = (unsigned int)face.indices.size();
  424. faces->mIndices = new unsigned int [faces->mNumIndices];
  425. aiVector3D faceNormal;
  426. bool fnOK = false;
  427. for (unsigned int n = 0; n < faces->mNumIndices;++n, ++cnt, ++norms, ++verts)
  428. {
  429. if (face.indices[n] >= m.verts.size())
  430. {
  431. ASSIMP_LOG_WARN("Quick3D: Vertex index overflow");
  432. face.indices[n] = 0;
  433. }
  434. // copy vertices
  435. *verts = m.verts[ face.indices[n] ];
  436. if (face.indices[n] >= m.normals.size() && faces->mNumIndices >= 3)
  437. {
  438. // we have no normal here - assign the face normal
  439. if (!fnOK)
  440. {
  441. const aiVector3D& pV1 = m.verts[ face.indices[0] ];
  442. const aiVector3D& pV2 = m.verts[ face.indices[1] ];
  443. const aiVector3D& pV3 = m.verts[ face.indices.size() - 1 ];
  444. faceNormal = (pV2 - pV1) ^ (pV3 - pV1).Normalize();
  445. fnOK = true;
  446. }
  447. *norms = faceNormal;
  448. }
  449. else *norms = m.normals[ face.indices[n] ];
  450. // copy texture coordinates
  451. if (uv && m.uv.size())
  452. {
  453. if (m.prevUVIdx != 0xffffffff && m.uv.size() >= m.verts.size()) // workaround
  454. {
  455. *uv = m.uv[face.indices[n]];
  456. }
  457. else
  458. {
  459. if (face.uvindices[n] >= m.uv.size())
  460. {
  461. ASSIMP_LOG_WARN("Quick3D: Texture coordinate index overflow");
  462. face.uvindices[n] = 0;
  463. }
  464. *uv = m.uv[face.uvindices[n]];
  465. }
  466. uv->y = 1.f - uv->y;
  467. ++uv;
  468. }
  469. // setup the new vertex index
  470. faces->mIndices[n] = cnt;
  471. }
  472. }
  473. ++real;
  474. }
  475. // Delete our nice helper array
  476. delete[] fidx;
  477. // Now we need to attach the meshes to the root node of the scene
  478. pScene->mRootNode->mNumMeshes = pScene->mNumMeshes;
  479. pScene->mRootNode->mMeshes = new unsigned int [pScene->mNumMeshes];
  480. for (unsigned int i = 0; i < pScene->mNumMeshes;++i)
  481. pScene->mRootNode->mMeshes[i] = i;
  482. /*pScene->mRootNode->mTransformation *= aiMatrix4x4(
  483. 1.f, 0.f, 0.f, 0.f,
  484. 0.f, -1.f,0.f, 0.f,
  485. 0.f, 0.f, 1.f, 0.f,
  486. 0.f, 0.f, 0.f, 1.f);*/
  487. // Add cameras and light sources to the scene root node
  488. pScene->mRootNode->mNumChildren = pScene->mNumLights+pScene->mNumCameras;
  489. if (pScene->mRootNode->mNumChildren)
  490. {
  491. pScene->mRootNode->mChildren = new aiNode* [ pScene->mRootNode->mNumChildren ];
  492. // the light source
  493. aiNode* nd = pScene->mRootNode->mChildren[0] = new aiNode();
  494. nd->mParent = pScene->mRootNode;
  495. nd->mName.Set("Q3DLight");
  496. nd->mTransformation = pScene->mRootNode->mTransformation;
  497. nd->mTransformation.Inverse();
  498. // camera
  499. nd = pScene->mRootNode->mChildren[1] = new aiNode();
  500. nd->mParent = pScene->mRootNode;
  501. nd->mName.Set("Q3DCamera");
  502. nd->mTransformation = pScene->mRootNode->mChildren[0]->mTransformation;
  503. }
  504. }
  505. #endif // !! ASSIMP_BUILD_NO_Q3D_IMPORTER