AnimationState.pkg 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. $#include "Graphics/AnimationState.h"
  2. enum AnimationBlendMode
  3. {
  4. ABM_LERP = 0,
  5. ABM_ADDITIVE
  6. };
  7. class AnimationState
  8. {
  9. AnimationState(AnimatedModel* model, Animation* animation);
  10. AnimationState(Node* node, Animation* animation);
  11. ~AnimationState();
  12. void SetStartBone(Bone* bone);
  13. void SetLooped(bool looped);
  14. void SetWeight(float weight);
  15. void SetTime(float time);
  16. void SetBoneWeight(const String name, float weight, bool recursive = false);
  17. void SetBoneWeight(StringHash nameHash, float weight, bool recursive = false);
  18. void SetBoneWeight(unsigned index, float weight, bool recursive = false);
  19. void AddWeight(float delta);
  20. void AddTime(float delta);
  21. void SetLayer(unsigned char layer);
  22. void SetBlendMode(AnimationBlendMode mode);
  23. Animation* GetAnimation() const;
  24. Bone* GetStartBone() const;
  25. float GetBoneWeight(const String name) const;
  26. float GetBoneWeight(StringHash nameHash) const;
  27. float GetBoneWeight(unsigned index) const;
  28. unsigned GetTrackIndex(const String name) const;
  29. unsigned GetTrackIndex(StringHash nameHash) const;
  30. bool IsEnabled() const;
  31. bool IsLooped() const;
  32. float GetWeight() const;
  33. float GetTime() const;
  34. float GetLength() const;
  35. unsigned char GetLayer() const;
  36. AnimationBlendMode GetBlendMode() const;
  37. tolua_readonly tolua_property__get_set Animation* animation;
  38. tolua_property__get_set Bone* startBone;
  39. tolua_readonly tolua_property__is_set bool enabled;
  40. tolua_property__is_set bool looped;
  41. tolua_property__get_set float weight;
  42. tolua_property__get_set float time;
  43. tolua_readonly tolua_property__get_set float length;
  44. tolua_property__get_set unsigned char layer;
  45. tolua_property__get_set AnimationBlendMode blendMode;
  46. };