IKSolver.pkg 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. $#include "IK/IKSolver.h"
  2. class IKSolver : public Component
  3. {
  4. enum Algorithm
  5. {
  6. ONE_BONE = 0,
  7. TWO_BONE,
  8. FABRIK
  9. };
  10. enum Feature
  11. {
  12. JOINT_ROTATIONS = 0x01,
  13. TARGET_ROTATIONS = 0x02,
  14. UPDATE_ORIGINAL_POSE = 0x04,
  15. UPDATE_ACTIVE_POSE = 0x08,
  16. USE_ORIGINAL_POSE = 0x10,
  17. CONSTRAINTS = 0x20,
  18. AUTO_SOLVE = 0x40
  19. };
  20. void RebuildChainTrees();
  21. void RecalculateSegmentLengths();
  22. void CalculateJointRotations();
  23. void Solve();
  24. void ApplyOriginalPoseToScene();
  25. void ApplySceneToOriginalPose();
  26. void ApplyActivePoseToScene();
  27. void ApplySceneToActivePose();
  28. void ApplyOriginalPoseToActivePose();
  29. void DrawDebugGeometry(bool depthTest);
  30. tolua_property__get_set Algorithm algorithm;
  31. tolua_property__get_set unsigned maximumIterations;
  32. tolua_property__get_set float tolerance;
  33. tolua_property__get_set bool JOINT_ROTATIONS;
  34. tolua_property__get_set bool TARGET_ROTATIONS;
  35. tolua_property__get_set bool UPDATE_ORIGINAL_POSE;
  36. tolua_property__get_set bool UPDATE_ACTIVE_POSE;
  37. tolua_property__get_set bool USE_ORIGINAL_POSE;
  38. tolua_property__get_set bool CONSTRAINTS;
  39. tolua_property__get_set bool AUTO_SOLVE;
  40. };