Spline.pkg 782 B

123456789101112131415161718192021222324252627282930313233
  1. $#include "Core/Spline.h"
  2. enum InterpolationMode
  3. {
  4. BEZIER_CURVE,
  5. CATMULL_ROM_CURVE,
  6. LINEAR_CURVE,
  7. CATMULL_ROM_FULL_CURVE
  8. };
  9. class Spline
  10. {
  11. Spline();
  12. Spline(InterpolationMode mode);
  13. Spline(const Spline& rhs);
  14. // When export constructor, the destructor must export also. otherwise Lua will not collect the object.
  15. ~Spline();
  16. bool operator ==(const Spline& rhs) const;
  17. Variant GetPoint(float f) const;
  18. Variant GetKnot(unsigned index) const;
  19. void SetKnot(const Variant& knot, unsigned);
  20. void AddKnot(const Variant& knot);
  21. void AddKnot(const Variant& knot, unsigned index);
  22. void RemoveKnot();
  23. void RemoveKnot(unsigned index);
  24. void Clear();
  25. tolua_property__get_set InterpolationMode interpolationMode;
  26. };