ColladaHelper.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. /** Helper structures for the Collada loader */
  2. /*
  3. Open Asset Import Library (assimp)
  4. ----------------------------------------------------------------------
  5. Copyright (c) 2006-2020, 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
  9. following 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. #ifndef AI_COLLADAHELPER_H_INC
  35. #define AI_COLLADAHELPER_H_INC
  36. #include <assimp/light.h>
  37. #include <assimp/material.h>
  38. #include <assimp/mesh.h>
  39. #include <stdint.h>
  40. #include <map>
  41. #include <set>
  42. #include <vector>
  43. struct aiMaterial;
  44. namespace Assimp {
  45. namespace Collada {
  46. /** Collada file versions which evolved during the years ... */
  47. enum FormatVersion {
  48. FV_1_5_n,
  49. FV_1_4_n,
  50. FV_1_3_n
  51. };
  52. /** Transformation types that can be applied to a node */
  53. enum TransformType {
  54. TF_LOOKAT,
  55. TF_ROTATE,
  56. TF_TRANSLATE,
  57. TF_SCALE,
  58. TF_SKEW,
  59. TF_MATRIX
  60. };
  61. /** Different types of input data to a vertex or face */
  62. enum InputType {
  63. IT_Invalid,
  64. IT_Vertex, // special type for per-index data referring to the <vertices> element carrying the per-vertex data.
  65. IT_Position,
  66. IT_Normal,
  67. IT_Texcoord,
  68. IT_Color,
  69. IT_Tangent,
  70. IT_Bitangent
  71. };
  72. /** Supported controller types */
  73. enum ControllerType {
  74. Skin,
  75. Morph
  76. };
  77. /** Supported morph methods */
  78. enum MorphMethod {
  79. Normalized,
  80. Relative
  81. };
  82. /** Common metadata keys as <Collada, Assimp> */
  83. typedef std::pair<std::string, std::string> MetaKeyPair;
  84. typedef std::vector<MetaKeyPair> MetaKeyPairVector;
  85. // Collada as lower_case (native)
  86. const MetaKeyPairVector &GetColladaAssimpMetaKeys();
  87. // Collada as CamelCase (used by Assimp for consistency)
  88. const MetaKeyPairVector &GetColladaAssimpMetaKeysCamelCase();
  89. /** Convert underscore_separated to CamelCase "authoring_tool" becomes "AuthoringTool" */
  90. void ToCamelCase(std::string &text);
  91. /** Contains all data for one of the different transformation types */
  92. struct Transform {
  93. std::string mID; ///< SID of the transform step, by which anim channels address their target node
  94. TransformType mType;
  95. ai_real f[16]; ///< Interpretation of data depends on the type of the transformation
  96. };
  97. /** A collada camera. */
  98. struct Camera {
  99. Camera() :
  100. mOrtho(false),
  101. mHorFov(10e10f),
  102. mVerFov(10e10f),
  103. mAspect(10e10f),
  104. mZNear(0.1f),
  105. mZFar(1000.f) {}
  106. // Name of camera
  107. std::string mName;
  108. // True if it is an orthografic camera
  109. bool mOrtho;
  110. //! Horizontal field of view in degrees
  111. ai_real mHorFov;
  112. //! Vertical field of view in degrees
  113. ai_real mVerFov;
  114. //! Screen aspect
  115. ai_real mAspect;
  116. //! Near& far z
  117. ai_real mZNear, mZFar;
  118. };
  119. #define ASSIMP_COLLADA_LIGHT_ANGLE_NOT_SET 1e9f
  120. /** A collada light source. */
  121. struct Light {
  122. Light() :
  123. mType(aiLightSource_UNDEFINED),
  124. mAttConstant(1.f),
  125. mAttLinear(0.f),
  126. mAttQuadratic(0.f),
  127. mFalloffAngle(180.f),
  128. mFalloffExponent(0.f),
  129. mPenumbraAngle(ASSIMP_COLLADA_LIGHT_ANGLE_NOT_SET),
  130. mOuterAngle(ASSIMP_COLLADA_LIGHT_ANGLE_NOT_SET),
  131. mIntensity(1.f) {}
  132. //! Type of the light source aiLightSourceType + ambient
  133. unsigned int mType;
  134. //! Color of the light
  135. aiColor3D mColor;
  136. //! Light attenuation
  137. ai_real mAttConstant, mAttLinear, mAttQuadratic;
  138. //! Spot light falloff
  139. ai_real mFalloffAngle;
  140. ai_real mFalloffExponent;
  141. // -----------------------------------------------------
  142. // FCOLLADA extension from here
  143. //! ... related stuff from maja and max extensions
  144. ai_real mPenumbraAngle;
  145. ai_real mOuterAngle;
  146. //! Common light intensity
  147. ai_real mIntensity;
  148. };
  149. /** Short vertex index description */
  150. struct InputSemanticMapEntry {
  151. InputSemanticMapEntry() :
  152. mSet(0),
  153. mType(IT_Invalid) {}
  154. //! Index of set, optional
  155. unsigned int mSet;
  156. //! Type of referenced vertex input
  157. InputType mType;
  158. };
  159. /** Table to map from effect to vertex input semantics */
  160. struct SemanticMappingTable {
  161. //! Name of material
  162. std::string mMatName;
  163. //! List of semantic map commands, grouped by effect semantic name
  164. std::map<std::string, InputSemanticMapEntry> mMap;
  165. //! For std::find
  166. bool operator==(const std::string &s) const {
  167. return s == mMatName;
  168. }
  169. };
  170. /** A reference to a mesh inside a node, including materials assigned to the various subgroups.
  171. * The ID refers to either a mesh or a controller which specifies the mesh
  172. */
  173. struct MeshInstance {
  174. ///< ID of the mesh or controller to be instanced
  175. std::string mMeshOrController;
  176. ///< Map of materials by the subgroup ID they're applied to
  177. std::map<std::string, SemanticMappingTable> mMaterials;
  178. };
  179. /** A reference to a camera inside a node*/
  180. struct CameraInstance {
  181. ///< ID of the camera
  182. std::string mCamera;
  183. };
  184. /** A reference to a light inside a node*/
  185. struct LightInstance {
  186. ///< ID of the camera
  187. std::string mLight;
  188. };
  189. /** A reference to a node inside a node*/
  190. struct NodeInstance {
  191. ///< ID of the node
  192. std::string mNode;
  193. };
  194. /** A node in a scene hierarchy */
  195. struct Node {
  196. std::string mName;
  197. std::string mID;
  198. std::string mSID;
  199. Node *mParent;
  200. std::vector<Node *> mChildren;
  201. /** Operations in order to calculate the resulting transformation to parent. */
  202. std::vector<Transform> mTransforms;
  203. /** Meshes at this node */
  204. std::vector<MeshInstance> mMeshes;
  205. /** Lights at this node */
  206. std::vector<LightInstance> mLights;
  207. /** Cameras at this node */
  208. std::vector<CameraInstance> mCameras;
  209. /** Node instances at this node */
  210. std::vector<NodeInstance> mNodeInstances;
  211. /** Root-nodes: Name of primary camera, if any */
  212. std::string mPrimaryCamera;
  213. //! Constructor. Begin with a zero parent
  214. Node() :
  215. mParent(nullptr) {
  216. // empty
  217. }
  218. //! Destructor: delete all children subsequently
  219. ~Node() {
  220. for (std::vector<Node *>::iterator it = mChildren.begin(); it != mChildren.end(); ++it)
  221. delete *it;
  222. }
  223. };
  224. /** Data source array: either floats or strings */
  225. struct Data {
  226. bool mIsStringArray;
  227. std::vector<ai_real> mValues;
  228. std::vector<std::string> mStrings;
  229. };
  230. /** Accessor to a data array */
  231. struct Accessor {
  232. size_t mCount; // in number of objects
  233. size_t mSize; // size of an object, in elements (floats or strings, mostly 1)
  234. size_t mOffset; // in number of values
  235. size_t mStride; // Stride in number of values
  236. std::vector<std::string> mParams; // names of the data streams in the accessors. Empty string tells to ignore.
  237. size_t mSubOffset[4]; // Suboffset inside the object for the common 4 elements. For a vector, that's XYZ, for a color RGBA and so on.
  238. // For example, SubOffset[0] denotes which of the values inside the object is the vector X component.
  239. std::string mSource; // URL of the source array
  240. mutable const Data *mData; // Pointer to the source array, if resolved. nullptr else
  241. Accessor() {
  242. mCount = 0;
  243. mSize = 0;
  244. mOffset = 0;
  245. mStride = 0;
  246. mData = nullptr;
  247. mSubOffset[0] = mSubOffset[1] = mSubOffset[2] = mSubOffset[3] = 0;
  248. }
  249. };
  250. /** A single face in a mesh */
  251. struct Face {
  252. std::vector<size_t> mIndices;
  253. };
  254. /** An input channel for mesh data, referring to a single accessor */
  255. struct InputChannel {
  256. InputType mType; // Type of the data
  257. size_t mIndex; // Optional index, if multiple sets of the same data type are given
  258. size_t mOffset; // Index offset in the indices array of per-face indices. Don't ask, can't explain that any better.
  259. std::string mAccessor; // ID of the accessor where to read the actual values from.
  260. mutable const Accessor *mResolved; // Pointer to the accessor, if resolved. nullptr else
  261. InputChannel() {
  262. mType = IT_Invalid;
  263. mIndex = 0;
  264. mOffset = 0;
  265. mResolved = nullptr;
  266. }
  267. };
  268. /** Subset of a mesh with a certain material */
  269. struct SubMesh {
  270. std::string mMaterial; ///< subgroup identifier
  271. size_t mNumFaces; ///< number of faces in this submesh
  272. };
  273. /** Contains data for a single mesh */
  274. struct Mesh {
  275. Mesh(const std::string &id) :
  276. mId(id) {
  277. for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i)
  278. mNumUVComponents[i] = 2;
  279. }
  280. const std::string mId;
  281. std::string mName;
  282. // just to check if there's some sophisticated addressing involved...
  283. // which we don't support, and therefore should warn about.
  284. std::string mVertexID;
  285. // Vertex data addressed by vertex indices
  286. std::vector<InputChannel> mPerVertexData;
  287. // actual mesh data, assembled on encounter of a <p> element. Verbose format, not indexed
  288. std::vector<aiVector3D> mPositions;
  289. std::vector<aiVector3D> mNormals;
  290. std::vector<aiVector3D> mTangents;
  291. std::vector<aiVector3D> mBitangents;
  292. std::vector<aiVector3D> mTexCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
  293. std::vector<aiColor4D> mColors[AI_MAX_NUMBER_OF_COLOR_SETS];
  294. unsigned int mNumUVComponents[AI_MAX_NUMBER_OF_TEXTURECOORDS];
  295. // Faces. Stored are only the number of vertices for each face.
  296. // 1 == point, 2 == line, 3 == triangle, 4+ == poly
  297. std::vector<size_t> mFaceSize;
  298. // Position indices for all faces in the sequence given in mFaceSize -
  299. // necessary for bone weight assignment
  300. std::vector<size_t> mFacePosIndices;
  301. // Submeshes in this mesh, each with a given material
  302. std::vector<SubMesh> mSubMeshes;
  303. };
  304. /** Which type of primitives the ReadPrimitives() function is going to read */
  305. enum PrimitiveType {
  306. Prim_Invalid,
  307. Prim_Lines,
  308. Prim_LineStrip,
  309. Prim_Triangles,
  310. Prim_TriStrips,
  311. Prim_TriFans,
  312. Prim_Polylist,
  313. Prim_Polygon
  314. };
  315. /** A skeleton controller to deform a mesh with the use of joints */
  316. struct Controller {
  317. // controller type
  318. ControllerType mType;
  319. // Morphing method if type is Morph
  320. MorphMethod mMethod;
  321. // the URL of the mesh deformed by the controller.
  322. std::string mMeshId;
  323. // accessor URL of the joint names
  324. std::string mJointNameSource;
  325. ///< The bind shape matrix, as array of floats. I'm not sure what this matrix actually describes, but it can't be ignored in all cases
  326. ai_real mBindShapeMatrix[16];
  327. // accessor URL of the joint inverse bind matrices
  328. std::string mJointOffsetMatrixSource;
  329. // input channel: joint names.
  330. InputChannel mWeightInputJoints;
  331. // input channel: joint weights
  332. InputChannel mWeightInputWeights;
  333. // Number of weights per vertex.
  334. std::vector<size_t> mWeightCounts;
  335. // JointIndex-WeightIndex pairs for all vertices
  336. std::vector<std::pair<size_t, size_t>> mWeights;
  337. std::string mMorphTarget;
  338. std::string mMorphWeight;
  339. };
  340. /** A collada material. Pretty much the only member is a reference to an effect. */
  341. struct Material {
  342. std::string mName;
  343. std::string mEffect;
  344. };
  345. /** Type of the effect param */
  346. enum ParamType {
  347. Param_Sampler,
  348. Param_Surface
  349. };
  350. /** A param for an effect. Might be of several types, but they all just refer to each other, so I summarize them */
  351. struct EffectParam {
  352. ParamType mType;
  353. std::string mReference; // to which other thing the param is referring to.
  354. };
  355. /** Shading type supported by the standard effect spec of Collada */
  356. enum ShadeType {
  357. Shade_Invalid,
  358. Shade_Constant,
  359. Shade_Lambert,
  360. Shade_Phong,
  361. Shade_Blinn
  362. };
  363. /** Represents a texture sampler in collada */
  364. struct Sampler {
  365. Sampler() :
  366. mWrapU(true),
  367. mWrapV(true),
  368. mMirrorU(),
  369. mMirrorV(),
  370. mOp(aiTextureOp_Multiply),
  371. mUVId(UINT_MAX),
  372. mWeighting(1.f),
  373. mMixWithPrevious(1.f) {}
  374. /** Name of image reference
  375. */
  376. std::string mName;
  377. /** Wrap U?
  378. */
  379. bool mWrapU;
  380. /** Wrap V?
  381. */
  382. bool mWrapV;
  383. /** Mirror U?
  384. */
  385. bool mMirrorU;
  386. /** Mirror V?
  387. */
  388. bool mMirrorV;
  389. /** Blend mode
  390. */
  391. aiTextureOp mOp;
  392. /** UV transformation
  393. */
  394. aiUVTransform mTransform;
  395. /** Name of source UV channel
  396. */
  397. std::string mUVChannel;
  398. /** Resolved UV channel index or UINT_MAX if not known
  399. */
  400. unsigned int mUVId;
  401. // OKINO/MAX3D extensions from here
  402. // -------------------------------------------------------
  403. /** Weighting factor
  404. */
  405. ai_real mWeighting;
  406. /** Mixing factor from OKINO
  407. */
  408. ai_real mMixWithPrevious;
  409. };
  410. /** A collada effect. Can contain about anything according to the Collada spec,
  411. but we limit our version to a reasonable subset. */
  412. struct Effect {
  413. // Shading mode
  414. ShadeType mShadeType;
  415. // Colors
  416. aiColor4D mEmissive, mAmbient, mDiffuse, mSpecular,
  417. mTransparent, mReflective;
  418. // Textures
  419. Sampler mTexEmissive, mTexAmbient, mTexDiffuse, mTexSpecular,
  420. mTexTransparent, mTexBump, mTexReflective;
  421. // Scalar factory
  422. ai_real mShininess, mRefractIndex, mReflectivity;
  423. ai_real mTransparency;
  424. bool mHasTransparency;
  425. bool mRGBTransparency;
  426. bool mInvertTransparency;
  427. // local params referring to each other by their SID
  428. typedef std::map<std::string, Collada::EffectParam> ParamLibrary;
  429. ParamLibrary mParams;
  430. // MAX3D extensions
  431. // ---------------------------------------------------------
  432. // Double-sided?
  433. bool mDoubleSided, mWireframe, mFaceted;
  434. Effect() :
  435. mShadeType(Shade_Phong),
  436. mEmissive(0, 0, 0, 1),
  437. mAmbient(0.1f, 0.1f, 0.1f, 1),
  438. mDiffuse(0.6f, 0.6f, 0.6f, 1),
  439. mSpecular(0.4f, 0.4f, 0.4f, 1),
  440. mTransparent(0, 0, 0, 1),
  441. mShininess(10.0f),
  442. mRefractIndex(1.f),
  443. mReflectivity(0.f),
  444. mTransparency(1.f),
  445. mHasTransparency(false),
  446. mRGBTransparency(false),
  447. mInvertTransparency(false),
  448. mDoubleSided(false),
  449. mWireframe(false),
  450. mFaceted(false) {
  451. }
  452. };
  453. /** An image, meaning texture */
  454. struct Image {
  455. std::string mFileName;
  456. /** Embedded image data */
  457. std::vector<uint8_t> mImageData;
  458. /** File format hint of embedded image data */
  459. std::string mEmbeddedFormat;
  460. };
  461. /** An animation channel. */
  462. struct AnimationChannel {
  463. /** URL of the data to animate. Could be about anything, but we support only the
  464. * "NodeID/TransformID.SubElement" notation
  465. */
  466. std::string mTarget;
  467. /** Source URL of the time values. Collada calls them "input". Meh. */
  468. std::string mSourceTimes;
  469. /** Source URL of the value values. Collada calls them "output". */
  470. std::string mSourceValues;
  471. /** Source URL of the IN_TANGENT semantic values. */
  472. std::string mInTanValues;
  473. /** Source URL of the OUT_TANGENT semantic values. */
  474. std::string mOutTanValues;
  475. /** Source URL of the INTERPOLATION semantic values. */
  476. std::string mInterpolationValues;
  477. };
  478. /** An animation. Container for 0-x animation channels or 0-x animations */
  479. struct Animation {
  480. /** Anim name */
  481. std::string mName;
  482. /** the animation channels, if any */
  483. std::vector<AnimationChannel> mChannels;
  484. /** the sub-animations, if any */
  485. std::vector<Animation *> mSubAnims;
  486. /** Destructor */
  487. ~Animation() {
  488. for (std::vector<Animation *>::iterator it = mSubAnims.begin(); it != mSubAnims.end(); ++it)
  489. delete *it;
  490. }
  491. /** Collect all channels in the animation hierarchy into a single channel list. */
  492. void CollectChannelsRecursively(std::vector<AnimationChannel> &channels) {
  493. channels.insert(channels.end(), mChannels.begin(), mChannels.end());
  494. for (std::vector<Animation *>::iterator it = mSubAnims.begin(); it != mSubAnims.end(); ++it) {
  495. Animation *pAnim = (*it);
  496. pAnim->CollectChannelsRecursively(channels);
  497. }
  498. }
  499. /** Combine all single-channel animations' channel into the same (parent) animation channel list. */
  500. void CombineSingleChannelAnimations() {
  501. CombineSingleChannelAnimationsRecursively(this);
  502. }
  503. void CombineSingleChannelAnimationsRecursively(Animation *pParent) {
  504. std::set<std::string> childrenTargets;
  505. bool childrenAnimationsHaveDifferentChannels = true;
  506. for (std::vector<Animation *>::iterator it = pParent->mSubAnims.begin(); it != pParent->mSubAnims.end();) {
  507. Animation *anim = *it;
  508. CombineSingleChannelAnimationsRecursively(anim);
  509. if (childrenAnimationsHaveDifferentChannels && anim->mChannels.size() == 1 &&
  510. childrenTargets.find(anim->mChannels[0].mTarget) == childrenTargets.end()) {
  511. childrenTargets.insert(anim->mChannels[0].mTarget);
  512. } else {
  513. childrenAnimationsHaveDifferentChannels = false;
  514. }
  515. ++it;
  516. }
  517. // We only want to combine animations if they have different channels
  518. if (childrenAnimationsHaveDifferentChannels) {
  519. for (std::vector<Animation *>::iterator it = pParent->mSubAnims.begin(); it != pParent->mSubAnims.end();) {
  520. Animation *anim = *it;
  521. pParent->mChannels.push_back(anim->mChannels[0]);
  522. it = pParent->mSubAnims.erase(it);
  523. delete anim;
  524. continue;
  525. }
  526. }
  527. }
  528. };
  529. /** Description of a collada animation channel which has been determined to affect the current node */
  530. struct ChannelEntry {
  531. const Collada::AnimationChannel *mChannel; ///> the source channel
  532. std::string mTargetId;
  533. std::string mTransformId; // the ID of the transformation step of the node which is influenced
  534. size_t mTransformIndex; // Index into the node's transform chain to apply the channel to
  535. size_t mSubElement; // starting index inside the transform data
  536. // resolved data references
  537. const Collada::Accessor *mTimeAccessor; ///> Collada accessor to the time values
  538. const Collada::Data *mTimeData; ///> Source data array for the time values
  539. const Collada::Accessor *mValueAccessor; ///> Collada accessor to the key value values
  540. const Collada::Data *mValueData; ///> Source datat array for the key value values
  541. ChannelEntry() :
  542. mChannel(),
  543. mTransformIndex(),
  544. mSubElement(),
  545. mTimeAccessor(),
  546. mTimeData(),
  547. mValueAccessor(),
  548. mValueData() {}
  549. };
  550. } // end of namespace Collada
  551. } // end of namespace Assimp
  552. #endif // AI_COLLADAHELPER_H_INC