BsAnimationEx.cpp 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #include "Extensions/BsAnimationEx.h"
  4. using namespace std::placeholders;
  5. namespace bs
  6. {
  7. Vector<TNamedAnimationCurve<Vector3>> AnimationCurvesEx::getPositionCurves(const SPtr<AnimationCurves>& thisPtr)
  8. {
  9. return thisPtr->position;
  10. }
  11. void AnimationCurvesEx::setPositionCurves(const SPtr<AnimationCurves>& thisPtr, const Vector<TNamedAnimationCurve<Vector3>>& value)
  12. {
  13. thisPtr->position = value;
  14. }
  15. Vector<TNamedAnimationCurve<Quaternion>> AnimationCurvesEx::getRotationCurves(const SPtr<AnimationCurves>& thisPtr)
  16. {
  17. return thisPtr->rotation;
  18. }
  19. void AnimationCurvesEx::setRotationCurves(const SPtr<AnimationCurves>& thisPtr, const Vector<TNamedAnimationCurve<Quaternion>>& value)
  20. {
  21. thisPtr->rotation = value;
  22. }
  23. Vector<TNamedAnimationCurve<Vector3>> AnimationCurvesEx::getScaleCurves(const SPtr<AnimationCurves>& thisPtr)
  24. {
  25. return thisPtr->scale;
  26. }
  27. void AnimationCurvesEx::setScaleCurves(const SPtr<AnimationCurves>& thisPtr, const Vector<TNamedAnimationCurve<Vector3>>& value)
  28. {
  29. thisPtr->scale = value;
  30. }
  31. Vector<TNamedAnimationCurve<float>> AnimationCurvesEx::getGenericCurves(const SPtr<AnimationCurves>& thisPtr)
  32. {
  33. return thisPtr->generic;
  34. }
  35. void AnimationCurvesEx::setGenericCurves(const SPtr<AnimationCurves>& thisPtr, const Vector<TNamedAnimationCurve<float>>& value)
  36. {
  37. thisPtr->generic = value;
  38. }
  39. TAnimationCurve<Vector3> RootMotionEx::getPositionCurves(const SPtr<RootMotion>& thisPtr)
  40. {
  41. return thisPtr->position;
  42. }
  43. TAnimationCurve<Quaternion> RootMotionEx::getRotationCurves(const SPtr<RootMotion>& thisPtr)
  44. {
  45. return thisPtr->rotation;
  46. }
  47. }