assimpAppSequence.cpp 887 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #include "ts/assimp/assimpShapeLoader.h"
  2. #include "console/console.h"
  3. #include "core/stream/fileStream.h"
  4. #include "core/stringTable.h"
  5. #include "math/mathIO.h"
  6. #include "ts/tsShape.h"
  7. #include "ts/tsShapeInstance.h"
  8. #include "materials/materialManager.h"
  9. #include "console/persistenceManager.h"
  10. #include "ts/assimp/assimpAppMaterial.h"
  11. #include "ts/assimp/assimpAppSequence.h"
  12. AssimpAppSequence::AssimpAppSequence(aiAnimation *a) :
  13. mAnim(a)
  14. {
  15. fps = mAnim->mTicksPerSecond;
  16. }
  17. AssimpAppSequence::~AssimpAppSequence()
  18. {
  19. }
  20. F32 AssimpAppSequence::getStart() const
  21. {
  22. return 0.0f;
  23. }
  24. F32 AssimpAppSequence::getEnd() const
  25. {
  26. return (F32)mAnim->mDuration / fps;
  27. }
  28. U32 AssimpAppSequence::getFlags() const
  29. {
  30. return TSShape::Blend;
  31. }
  32. F32 AssimpAppSequence::getPriority() const
  33. {
  34. return 5;
  35. }
  36. F32 AssimpAppSequence::getBlendRefTime() const
  37. {
  38. return -1.0f;
  39. }