colladaAppSequence.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2012 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. #ifndef _COLLADA_APPSEQUENCE_H_
  23. #define _COLLADA_APPSEQUENCE_H_
  24. #ifndef _APPSEQUENCE_H_
  25. #include "ts/loader/appSequence.h"
  26. #endif
  27. class domAnimation_clip;
  28. class ColladaExtension_animation_clip;
  29. class ColladaAppSequence : public AppSequence
  30. {
  31. const domAnimation_clip* pClip;
  32. ColladaExtension_animation_clip* clipExt;
  33. F32 seqStart;
  34. F32 seqEnd;
  35. void setAnimationActive(const domAnimation* anim, bool active);
  36. public:
  37. ColladaAppSequence(const domAnimation_clip* clip);
  38. ~ColladaAppSequence();
  39. void setActive(bool active);
  40. const domAnimation_clip* getClip() const { return pClip; }
  41. S32 getNumTriggers();
  42. void getTrigger(S32 index, TSShape::Trigger& trigger);
  43. const char* getName() const;
  44. F32 getStart() const { return seqStart; }
  45. F32 getEnd() const { return seqEnd; }
  46. void setEnd(F32 end) { seqEnd = end; }
  47. U32 getFlags() const;
  48. F32 getPriority();
  49. F32 getBlendRefTime();
  50. };
  51. #endif // _COLLADA_APPSEQUENCE_H_