ASEParser.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. /*
  2. Open Asset Import Library (assimp)
  3. ----------------------------------------------------------------------
  4. Copyright (c) 2006-2017, assimp team
  5. All rights reserved.
  6. Redistribution and use of this software in source and binary forms,
  7. with or without modification, are permitted provided that the
  8. following conditions are met:
  9. * Redistributions of source code must retain the above
  10. copyright notice, this list of conditions and the
  11. following disclaimer.
  12. * Redistributions in binary form must reproduce the above
  13. copyright notice, this list of conditions and the
  14. following disclaimer in the documentation and/or other
  15. materials provided with the distribution.
  16. * Neither the name of the assimp team, nor the names of its
  17. contributors may be used to endorse or promote products
  18. derived from this software without specific prior
  19. written permission of the assimp team.
  20. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  23. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  24. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  25. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  26. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. ----------------------------------------------------------------------
  32. */
  33. /** @file Defines the helper data structures for importing ASE files */
  34. #ifndef AI_ASEFILEHELPER_H_INC
  35. #define AI_ASEFILEHELPER_H_INC
  36. // public ASSIMP headers
  37. #include <assimp/types.h>
  38. #include <assimp/mesh.h>
  39. #include <assimp/anim.h>
  40. #ifndef ASSIMP_BUILD_NO_3DS_IMPORTER
  41. // for some helper routines like IsSpace()
  42. #include <assimp/ParsingUtils.h>
  43. #include <assimp/qnan.h>
  44. // ASE is quite similar to 3ds. We can reuse some structures
  45. #include "3DSLoader.h"
  46. namespace Assimp {
  47. namespace ASE {
  48. using namespace D3DS;
  49. // ---------------------------------------------------------------------------
  50. /** Helper structure representing an ASE material */
  51. struct Material : public D3DS::Material
  52. {
  53. //! Default constructor
  54. Material()
  55. : pcInstance(NULL)
  56. , bNeed (false)
  57. {}
  58. Material(const Material &other) = default;
  59. Material(Material &&other) = default;
  60. Material &operator=(const Material &other) = default;
  61. Material &operator=(Material &&other) = default;
  62. ~Material() {}
  63. //! Contains all sub materials of this material
  64. std::vector<Material> avSubMaterials;
  65. //! aiMaterial object
  66. aiMaterial* pcInstance;
  67. //! Can we remove this material?
  68. bool bNeed;
  69. };
  70. // ---------------------------------------------------------------------------
  71. /** Helper structure to represent an ASE file face */
  72. struct Face : public FaceWithSmoothingGroup
  73. {
  74. //! Default constructor. Initializes everything with 0
  75. Face()
  76. {
  77. mColorIndices[0] = mColorIndices[1] = mColorIndices[2] = 0;
  78. for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS;++i)
  79. {
  80. amUVIndices[i][0] = amUVIndices[i][1] = amUVIndices[i][2] = 0;
  81. }
  82. iMaterial = DEFAULT_MATINDEX;
  83. iFace = 0;
  84. }
  85. //! special value to indicate that no material index has
  86. //! been assigned to a face. The default material index
  87. //! will replace this value later.
  88. static const unsigned int DEFAULT_MATINDEX = 0xFFFFFFFF;
  89. //! Indices into each list of texture coordinates
  90. unsigned int amUVIndices[AI_MAX_NUMBER_OF_TEXTURECOORDS][3];
  91. //! Index into the list of vertex colors
  92. unsigned int mColorIndices[3];
  93. //! (Sub)Material index to be assigned to this face
  94. unsigned int iMaterial;
  95. //! Index of the face. It is not specified whether it is
  96. //! a requirement of the file format that all faces are
  97. //! written in sequential order, so we have to expect this case
  98. unsigned int iFace;
  99. };
  100. // ---------------------------------------------------------------------------
  101. /** Helper structure to represent an ASE file bone */
  102. struct Bone
  103. {
  104. //! Constructor
  105. Bone()
  106. {
  107. static int iCnt = 0;
  108. // Generate a default name for the bone
  109. char szTemp[128];
  110. ::ai_snprintf(szTemp, 128, "UNNAMED_%i",iCnt++);
  111. mName = szTemp;
  112. }
  113. //! Construction from an existing name
  114. explicit Bone( const std::string& name)
  115. : mName (name)
  116. {}
  117. //! Name of the bone
  118. std::string mName;
  119. };
  120. // ---------------------------------------------------------------------------
  121. /** Helper structure to represent an ASE file bone vertex */
  122. struct BoneVertex
  123. {
  124. //! Bone and corresponding vertex weight.
  125. //! -1 for unrequired bones ....
  126. std::vector<std::pair<int,float> > mBoneWeights;
  127. //! Position of the bone vertex.
  128. //! MUST be identical to the vertex position
  129. //aiVector3D mPosition;
  130. };
  131. // ---------------------------------------------------------------------------
  132. /** Helper structure to represent an ASE file animation */
  133. struct Animation
  134. {
  135. enum Type
  136. {
  137. TRACK = 0x0,
  138. BEZIER = 0x1,
  139. TCB = 0x2
  140. } mRotationType, mScalingType, mPositionType;
  141. Animation()
  142. : mRotationType (TRACK)
  143. , mScalingType (TRACK)
  144. , mPositionType (TRACK)
  145. {}
  146. //! List of track rotation keyframes
  147. std::vector< aiQuatKey > akeyRotations;
  148. //! List of track position keyframes
  149. std::vector< aiVectorKey > akeyPositions;
  150. //! List of track scaling keyframes
  151. std::vector< aiVectorKey > akeyScaling;
  152. };
  153. // ---------------------------------------------------------------------------
  154. /** Helper structure to represent the inheritance information of an ASE node */
  155. struct InheritanceInfo
  156. {
  157. //! Default constructor
  158. InheritanceInfo()
  159. {
  160. // set the inheritance flag for all axes by default to true
  161. for (unsigned int i = 0; i < 3;++i)
  162. abInheritPosition[i] = abInheritRotation[i] = abInheritScaling[i] = true;
  163. }
  164. //! Inherit the parent's position?, axis order is x,y,z
  165. bool abInheritPosition[3];
  166. //! Inherit the parent's rotation?, axis order is x,y,z
  167. bool abInheritRotation[3];
  168. //! Inherit the parent's scaling?, axis order is x,y,z
  169. bool abInheritScaling[3];
  170. };
  171. // ---------------------------------------------------------------------------
  172. /** Represents an ASE file node. Base class for mesh, light and cameras */
  173. struct BaseNode
  174. {
  175. enum Type {Light, Camera, Mesh, Dummy} mType;
  176. //! Constructor. Creates a default name for the node
  177. explicit BaseNode(Type _mType)
  178. : mType (_mType)
  179. , mProcessed (false)
  180. {
  181. // generate a default name for the node
  182. static int iCnt = 0;
  183. char szTemp[128]; // should be sufficiently large
  184. ::ai_snprintf(szTemp, 128, "UNNAMED_%i",iCnt++);
  185. mName = szTemp;
  186. // Set mTargetPosition to qnan
  187. const ai_real qnan = get_qnan();
  188. mTargetPosition.x = qnan;
  189. }
  190. //! Name of the mesh
  191. std::string mName;
  192. //! Name of the parent of the node
  193. //! "" if there is no parent ...
  194. std::string mParent;
  195. //! Transformation matrix of the node
  196. aiMatrix4x4 mTransform;
  197. //! Target position (target lights and cameras)
  198. aiVector3D mTargetPosition;
  199. //! Specifies which axes transformations a node inherits
  200. //! from its parent ...
  201. InheritanceInfo inherit;
  202. //! Animation channels for the node
  203. Animation mAnim;
  204. //! Needed for lights and cameras: target animation channel
  205. //! Should contain position keys only.
  206. Animation mTargetAnim;
  207. bool mProcessed;
  208. };
  209. // ---------------------------------------------------------------------------
  210. /** Helper structure to represent an ASE file mesh */
  211. struct Mesh : public MeshWithSmoothingGroups<ASE::Face>, public BaseNode
  212. {
  213. //! Constructor.
  214. Mesh()
  215. : BaseNode (BaseNode::Mesh)
  216. , bSkip (false)
  217. {
  218. // use 2 texture vertex components by default
  219. for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c)
  220. this->mNumUVComponents[c] = 2;
  221. // setup the default material index by default
  222. iMaterialIndex = Face::DEFAULT_MATINDEX;
  223. }
  224. //! List of all texture coordinate sets
  225. std::vector<aiVector3D> amTexCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
  226. //! List of all vertex color sets.
  227. std::vector<aiColor4D> mVertexColors;
  228. //! List of all bone vertices
  229. std::vector<BoneVertex> mBoneVertices;
  230. //! List of all bones
  231. std::vector<Bone> mBones;
  232. //! Material index of the mesh
  233. unsigned int iMaterialIndex;
  234. //! Number of vertex components for each UVW set
  235. unsigned int mNumUVComponents[AI_MAX_NUMBER_OF_TEXTURECOORDS];
  236. //! used internally
  237. bool bSkip;
  238. };
  239. // ---------------------------------------------------------------------------
  240. /** Helper structure to represent an ASE light source */
  241. struct Light : public BaseNode
  242. {
  243. enum LightType
  244. {
  245. OMNI,
  246. TARGET,
  247. FREE,
  248. DIRECTIONAL
  249. };
  250. //! Constructor.
  251. Light()
  252. : BaseNode (BaseNode::Light)
  253. , mLightType (OMNI)
  254. , mColor (1.f,1.f,1.f)
  255. , mIntensity (1.f) // light is white by default
  256. , mAngle (45.f)
  257. , mFalloff (0.f)
  258. {
  259. }
  260. LightType mLightType;
  261. aiColor3D mColor;
  262. ai_real mIntensity;
  263. ai_real mAngle; // in degrees
  264. ai_real mFalloff;
  265. };
  266. // ---------------------------------------------------------------------------
  267. /** Helper structure to represent an ASE camera */
  268. struct Camera : public BaseNode
  269. {
  270. enum CameraType
  271. {
  272. FREE,
  273. TARGET
  274. };
  275. //! Constructor
  276. Camera()
  277. : BaseNode (BaseNode::Camera)
  278. , mFOV (0.75f) // in radians
  279. , mNear (0.1f)
  280. , mFar (1000.f) // could be zero
  281. , mCameraType (FREE)
  282. {
  283. }
  284. ai_real mFOV, mNear, mFar;
  285. CameraType mCameraType;
  286. };
  287. // ---------------------------------------------------------------------------
  288. /** Helper structure to represent an ASE helper object (dummy) */
  289. struct Dummy : public BaseNode
  290. {
  291. //! Constructor
  292. Dummy()
  293. : BaseNode (BaseNode::Dummy)
  294. {
  295. }
  296. };
  297. // Parameters to Parser::Parse()
  298. #define AI_ASE_NEW_FILE_FORMAT 200
  299. #define AI_ASE_OLD_FILE_FORMAT 110
  300. // Internally we're a little bit more tolerant
  301. #define AI_ASE_IS_NEW_FILE_FORMAT() (iFileFormat >= 200)
  302. #define AI_ASE_IS_OLD_FILE_FORMAT() (iFileFormat < 200)
  303. // -------------------------------------------------------------------------------
  304. /** \brief Class to parse ASE files
  305. */
  306. class Parser
  307. {
  308. private:
  309. Parser() {}
  310. public:
  311. // -------------------------------------------------------------------
  312. //! Construct a parser from a given input file which is
  313. //! guaranted to be terminated with zero.
  314. //! @param szFile Input file
  315. //! @param fileFormatDefault Assumed file format version. If the
  316. //! file format is specified in the file the new value replaces
  317. //! the default value.
  318. Parser (const char* szFile, unsigned int fileFormatDefault);
  319. // -------------------------------------------------------------------
  320. //! Parses the file into the parsers internal representation
  321. void Parse();
  322. private:
  323. // -------------------------------------------------------------------
  324. //! Parse the *SCENE block in a file
  325. void ParseLV1SceneBlock();
  326. // -------------------------------------------------------------------
  327. //! Parse the *MESH_SOFTSKINVERTS block in a file
  328. void ParseLV1SoftSkinBlock();
  329. // -------------------------------------------------------------------
  330. //! Parse the *MATERIAL_LIST block in a file
  331. void ParseLV1MaterialListBlock();
  332. // -------------------------------------------------------------------
  333. //! Parse a *<xxx>OBJECT block in a file
  334. //! \param mesh Node to be filled
  335. void ParseLV1ObjectBlock(BaseNode& mesh);
  336. // -------------------------------------------------------------------
  337. //! Parse a *MATERIAL blocks in a material list
  338. //! \param mat Material structure to be filled
  339. void ParseLV2MaterialBlock(Material& mat);
  340. // -------------------------------------------------------------------
  341. //! Parse a *NODE_TM block in a file
  342. //! \param mesh Node (!) object to be filled
  343. void ParseLV2NodeTransformBlock(BaseNode& mesh);
  344. // -------------------------------------------------------------------
  345. //! Parse a *TM_ANIMATION block in a file
  346. //! \param mesh Mesh object to be filled
  347. void ParseLV2AnimationBlock(BaseNode& mesh);
  348. void ParseLV3PosAnimationBlock(ASE::Animation& anim);
  349. void ParseLV3ScaleAnimationBlock(ASE::Animation& anim);
  350. void ParseLV3RotAnimationBlock(ASE::Animation& anim);
  351. // -------------------------------------------------------------------
  352. //! Parse a *MESH block in a file
  353. //! \param mesh Mesh object to be filled
  354. void ParseLV2MeshBlock(Mesh& mesh);
  355. // -------------------------------------------------------------------
  356. //! Parse a *LIGHT_SETTINGS block in a file
  357. //! \param light Light object to be filled
  358. void ParseLV2LightSettingsBlock(Light& light);
  359. // -------------------------------------------------------------------
  360. //! Parse a *CAMERA_SETTINGS block in a file
  361. //! \param cam Camera object to be filled
  362. void ParseLV2CameraSettingsBlock(Camera& cam);
  363. // -------------------------------------------------------------------
  364. //! Parse the *MAP_XXXXXX blocks in a material
  365. //! \param map Texture structure to be filled
  366. void ParseLV3MapBlock(Texture& map);
  367. // -------------------------------------------------------------------
  368. //! Parse a *MESH_VERTEX_LIST block in a file
  369. //! \param iNumVertices Value of *MESH_NUMVERTEX, if present.
  370. //! Otherwise zero. This is used to check the consistency of the file.
  371. //! A warning is sent to the logger if the validations fails.
  372. //! \param mesh Mesh object to be filled
  373. void ParseLV3MeshVertexListBlock(
  374. unsigned int iNumVertices,Mesh& mesh);
  375. // -------------------------------------------------------------------
  376. //! Parse a *MESH_FACE_LIST block in a file
  377. //! \param iNumFaces Value of *MESH_NUMFACES, if present.
  378. //! Otherwise zero. This is used to check the consistency of the file.
  379. //! A warning is sent to the logger if the validations fails.
  380. //! \param mesh Mesh object to be filled
  381. void ParseLV3MeshFaceListBlock(
  382. unsigned int iNumFaces,Mesh& mesh);
  383. // -------------------------------------------------------------------
  384. //! Parse a *MESH_TVERT_LIST block in a file
  385. //! \param iNumVertices Value of *MESH_NUMTVERTEX, if present.
  386. //! Otherwise zero. This is used to check the consistency of the file.
  387. //! A warning is sent to the logger if the validations fails.
  388. //! \param mesh Mesh object to be filled
  389. //! \param iChannel Output UVW channel
  390. void ParseLV3MeshTListBlock(
  391. unsigned int iNumVertices,Mesh& mesh, unsigned int iChannel = 0);
  392. // -------------------------------------------------------------------
  393. //! Parse a *MESH_TFACELIST block in a file
  394. //! \param iNumFaces Value of *MESH_NUMTVFACES, if present.
  395. //! Otherwise zero. This is used to check the consistency of the file.
  396. //! A warning is sent to the logger if the validations fails.
  397. //! \param mesh Mesh object to be filled
  398. //! \param iChannel Output UVW channel
  399. void ParseLV3MeshTFaceListBlock(
  400. unsigned int iNumFaces,Mesh& mesh, unsigned int iChannel = 0);
  401. // -------------------------------------------------------------------
  402. //! Parse an additional mapping channel
  403. //! (specified via *MESH_MAPPINGCHANNEL)
  404. //! \param iChannel Channel index to be filled
  405. //! \param mesh Mesh object to be filled
  406. void ParseLV3MappingChannel(
  407. unsigned int iChannel, Mesh& mesh);
  408. // -------------------------------------------------------------------
  409. //! Parse a *MESH_CVERTLIST block in a file
  410. //! \param iNumVertices Value of *MESH_NUMCVERTEX, if present.
  411. //! Otherwise zero. This is used to check the consistency of the file.
  412. //! A warning is sent to the logger if the validations fails.
  413. //! \param mesh Mesh object to be filled
  414. void ParseLV3MeshCListBlock(
  415. unsigned int iNumVertices, Mesh& mesh);
  416. // -------------------------------------------------------------------
  417. //! Parse a *MESH_CFACELIST block in a file
  418. //! \param iNumFaces Value of *MESH_NUMCVFACES, if present.
  419. //! Otherwise zero. This is used to check the consistency of the file.
  420. //! A warning is sent to the logger if the validations fails.
  421. //! \param mesh Mesh object to be filled
  422. void ParseLV3MeshCFaceListBlock(
  423. unsigned int iNumFaces, Mesh& mesh);
  424. // -------------------------------------------------------------------
  425. //! Parse a *MESH_NORMALS block in a file
  426. //! \param mesh Mesh object to be filled
  427. void ParseLV3MeshNormalListBlock(Mesh& mesh);
  428. // -------------------------------------------------------------------
  429. //! Parse a *MESH_WEIGHTSblock in a file
  430. //! \param mesh Mesh object to be filled
  431. void ParseLV3MeshWeightsBlock(Mesh& mesh);
  432. // -------------------------------------------------------------------
  433. //! Parse the bone list of a file
  434. //! \param mesh Mesh object to be filled
  435. //! \param iNumBones Number of bones in the mesh
  436. void ParseLV4MeshBones(unsigned int iNumBones,Mesh& mesh);
  437. // -------------------------------------------------------------------
  438. //! Parse the bone vertices list of a file
  439. //! \param mesh Mesh object to be filled
  440. //! \param iNumVertices Number of vertices to be parsed
  441. void ParseLV4MeshBonesVertices(unsigned int iNumVertices,Mesh& mesh);
  442. // -------------------------------------------------------------------
  443. //! Parse a *MESH_FACE block in a file
  444. //! \param out receive the face data
  445. void ParseLV4MeshFace(ASE::Face& out);
  446. // -------------------------------------------------------------------
  447. //! Parse a *MESH_VERT block in a file
  448. //! (also works for MESH_TVERT, MESH_CFACE, MESH_VERTCOL ...)
  449. //! \param apOut Output buffer (3 floats)
  450. //! \param rIndexOut Output index
  451. void ParseLV4MeshFloatTriple(ai_real* apOut, unsigned int& rIndexOut);
  452. // -------------------------------------------------------------------
  453. //! Parse a *MESH_VERT block in a file
  454. //! (also works for MESH_TVERT, MESH_CFACE, MESH_VERTCOL ...)
  455. //! \param apOut Output buffer (3 floats)
  456. void ParseLV4MeshFloatTriple(ai_real* apOut);
  457. // -------------------------------------------------------------------
  458. //! Parse a *MESH_TFACE block in a file
  459. //! (also works for MESH_CFACE)
  460. //! \param apOut Output buffer (3 ints)
  461. //! \param rIndexOut Output index
  462. void ParseLV4MeshLongTriple(unsigned int* apOut, unsigned int& rIndexOut);
  463. // -------------------------------------------------------------------
  464. //! Parse a *MESH_TFACE block in a file
  465. //! (also works for MESH_CFACE)
  466. //! \param apOut Output buffer (3 ints)
  467. void ParseLV4MeshLongTriple(unsigned int* apOut);
  468. // -------------------------------------------------------------------
  469. //! Parse a single float element
  470. //! \param fOut Output float
  471. void ParseLV4MeshFloat(ai_real& fOut);
  472. // -------------------------------------------------------------------
  473. //! Parse a single int element
  474. //! \param iOut Output integer
  475. void ParseLV4MeshLong(unsigned int& iOut);
  476. // -------------------------------------------------------------------
  477. //! Skip everything to the next: '*' or '\0'
  478. bool SkipToNextToken();
  479. // -------------------------------------------------------------------
  480. //! Skip the current section until the token after the closing }.
  481. //! This function handles embedded subsections correctly
  482. bool SkipSection();
  483. // -------------------------------------------------------------------
  484. //! Output a warning to the logger
  485. //! \param szWarn Warn message
  486. void LogWarning(const char* szWarn);
  487. // -------------------------------------------------------------------
  488. //! Output a message to the logger
  489. //! \param szWarn Message
  490. void LogInfo(const char* szWarn);
  491. // -------------------------------------------------------------------
  492. //! Output an error to the logger
  493. //! \param szWarn Error message
  494. AI_WONT_RETURN void LogError(const char* szWarn) AI_WONT_RETURN_SUFFIX;
  495. // -------------------------------------------------------------------
  496. //! Parse a string, enclosed in double quotation marks
  497. //! \param out Output string
  498. //! \param szName Name of the enclosing element -> used in error
  499. //! messages.
  500. //! \return false if an error occurred
  501. bool ParseString(std::string& out,const char* szName);
  502. public:
  503. //! Pointer to current data
  504. const char* filePtr;
  505. //! background color to be passed to the viewer
  506. //! QNAN if none was found
  507. aiColor3D m_clrBackground;
  508. //! Base ambient color to be passed to all materials
  509. //! QNAN if none was found
  510. aiColor3D m_clrAmbient;
  511. //! List of all materials found in the file
  512. std::vector<Material> m_vMaterials;
  513. //! List of all meshes found in the file
  514. std::vector<Mesh> m_vMeshes;
  515. //! List of all dummies found in the file
  516. std::vector<Dummy> m_vDummies;
  517. //! List of all lights found in the file
  518. std::vector<Light> m_vLights;
  519. //! List of all cameras found in the file
  520. std::vector<Camera> m_vCameras;
  521. //! Current line in the file
  522. unsigned int iLineNumber;
  523. //! First frame
  524. unsigned int iFirstFrame;
  525. //! Last frame
  526. unsigned int iLastFrame;
  527. //! Frame speed - frames per second
  528. unsigned int iFrameSpeed;
  529. //! Ticks per frame
  530. unsigned int iTicksPerFrame;
  531. //! true if the last character read was an end-line character
  532. bool bLastWasEndLine;
  533. //! File format version
  534. unsigned int iFileFormat;
  535. };
  536. } // Namespace ASE
  537. } // Namespace ASSIMP
  538. #endif // ASSIMP_BUILD_NO_3DS_IMPORTER
  539. #endif // !! include guard