assimpAppSequence.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #ifndef _MMATH_H_
  3. #include "math/mMath.h"
  4. #endif
  5. #ifndef _TVECTOR_H_
  6. #include "core/util/tVector.h"
  7. #endif
  8. #ifndef _TSSHAPE_H_
  9. #include "ts/tsShape.h"
  10. #endif
  11. #ifndef _APPNODE_H_
  12. #include "ts/loader/appNode.h"
  13. #endif
  14. #ifndef _APPMESH_H_
  15. #include "ts/loader/appMesh.h"
  16. #endif
  17. #ifndef _APPSEQUENCE_H_
  18. #include "ts/loader/appSequence.h"
  19. #endif
  20. #include <assimp/scene.h>
  21. class AssimpAppSequence : public AppSequence
  22. {
  23. String mSequenceName;
  24. F32 seqStart;
  25. F32 seqEnd;
  26. F32 mTimeMultiplier; // The factor needed to convert the sequence data timestamp to seconds
  27. public:
  28. AssimpAppSequence(aiAnimation *a);
  29. ~AssimpAppSequence();
  30. aiAnimation *mAnim;
  31. virtual void setActive(bool active);
  32. virtual S32 getNumTriggers() const { return 0; }
  33. virtual void getTrigger(S32 index, TSShape::Trigger& trigger) const { trigger.state = 0; }
  34. virtual const char* getName() const { return mSequenceName.c_str(); }
  35. F32 getStart() const { return seqStart; }
  36. F32 getEnd() const { return seqEnd; }
  37. void setEnd(F32 end) { seqEnd = end; }
  38. virtual U32 getFlags() const;
  39. virtual F32 getPriority() const;
  40. virtual F32 getBlendRefTime() const;
  41. };