Animation.h 973 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef ANIMATION_H_
  2. #define ANIMATION_H_
  3. #include "Object.h"
  4. #include "AnimationChannel.h"
  5. namespace gameplay
  6. {
  7. class Animation : public Object
  8. {
  9. public:
  10. /**
  11. * Constructor.
  12. */
  13. Animation(void);
  14. /**
  15. * Destructor.
  16. */
  17. virtual ~Animation(void);
  18. virtual unsigned int getTypeId(void) const;
  19. virtual const char* getElementName(void) const;
  20. virtual void writeBinary(FILE* file);
  21. virtual void writeText(FILE* file);
  22. void add(AnimationChannel* animationChannel);
  23. /**
  24. * Returns the number of animation channels contained in this animation.
  25. *
  26. * @return The number of animation channels.
  27. */
  28. unsigned int getAnimationChannelCount() const;
  29. /**
  30. * Returns the specified animation channel.
  31. */
  32. AnimationChannel* getAnimationChannel(unsigned int index) const;
  33. private:
  34. std::vector<AnimationChannel*> _channels;
  35. };
  36. }
  37. #endif