10 #ifndef hifi_IKTarget_h
11 #define hifi_IKTarget_h
13 #include "AnimSkeleton.h"
15 const float HACK_HMD_TARGET_WEIGHT = 8.0f;
45 HipsRelativeRotationAndPosition,
52 const glm::vec3& getTranslation()
const {
return _pose.trans(); }
53 const glm::quat& getRotation()
const {
return _pose.rot(); }
54 const AnimPose& getPose()
const {
return _pose; }
55 glm::vec3 getPoleVector()
const {
return _poleVector; }
56 glm::vec3 getPoleReferenceVector()
const {
return _poleReferenceVector; }
57 bool getPoleVectorEnabled()
const {
return _poleVectorEnabled; }
58 int getIndex()
const {
return _index; }
59 Type getType()
const {
return _type; }
60 int getNumFlexCoefficients()
const {
return (
int)_numFlexCoefficients; }
61 float getFlexCoefficient(
size_t chainDepth)
const;
63 void setPose(
const glm::quat& rotation,
const glm::vec3& translation);
64 void setPoleVector(
const glm::vec3& poleVector) { _poleVector = poleVector; }
65 void setPoleReferenceVector(
const glm::vec3& poleReferenceVector) { _poleReferenceVector = poleReferenceVector; }
66 void setPoleVectorEnabled(
bool poleVectorEnabled) { _poleVectorEnabled = poleVectorEnabled; }
67 void setIndex(
int index) { _index = index; }
69 void setFlexCoefficients(
size_t numFlexCoefficientsIn,
const float* flexCoefficientsIn);
71 void setWeight(
float weight) { _weight = weight; }
72 float getWeight()
const {
return _weight; }
74 enum FlexCoefficients { MAX_FLEX_COEFFICIENTS = 10 };
78 glm::vec3 _poleVector;
79 glm::vec3 _poleReferenceVector;
80 bool _poleVectorEnabled {
false };
82 Type _type { Type::Unknown };
83 float _weight { 0.0f };
84 float _flexCoefficients[MAX_FLEX_COEFFICIENTS];
85 size_t _numFlexCoefficients;
@ Unknown
Socket type unknown or not set.