ASEParser.h 22 KB

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