34 void resize(
int boneCount);
36 int getBoneCount()
const {
return static_cast<int>(locals_.size()); }
39 void copyFrom(
const AnimPose *other);
44 void setLocalPosition(
int boneIndex,
float x,
float y,
float z);
46 void setLocalRotation(
int boneIndex,
float x,
float y,
float z,
float w);
48 void setLocalScale(
int boneIndex,
float x,
float y,
float z);
51 float getLocalPositionX(
int boneIndex)
const;
53 float getLocalPositionY(
int boneIndex)
const;
55 float getLocalPositionZ(
int boneIndex)
const;
57 float getLocalRotationX(
int boneIndex)
const;
59 float getLocalRotationY(
int boneIndex)
const;
61 float getLocalRotationZ(
int boneIndex)
const;
63 float getLocalRotationW(
int boneIndex)
const;
65 float getLocalScaleX(
int boneIndex)
const;
67 float getLocalScaleY(
int boneIndex)
const;
69 float getLocalScaleZ(
int boneIndex)
const;
90 bool aimBone(
const AnimSkeleton* skeleton,
int boneIndex,
float targetX,
float targetY,
float targetZ,
114 bool solveTwoBoneIK(
const AnimSkeleton* skeleton,
int rootBone,
int midBone,
int tipBone,
float targetX,
115 float targetY,
float targetZ,
float weight = 1.f);
118 float getWorldPositionX(
int boneIndex)
const;
120 float getWorldPositionY(
int boneIndex)
const;
122 float getWorldPositionZ(
int boneIndex)
const;
124 float getWorldRotationX(
int boneIndex)
const;
126 float getWorldRotationY(
int boneIndex)
const;
128 float getWorldRotationZ(
int boneIndex)
const;
130 float getWorldRotationW(
int boneIndex)
const;
136 float getWorldMatrixElement(
int boneIndex,
int elementIndex)
const;
138 void getWorldMatrix(
int boneIndex,
float *out16)
const;
148 void requireBone(
int boneIndex)
const;
149 bool solveTwoBoneIKPoleImpl(
const AnimSkeleton* skeleton,
int rootBone,
int midBone,
int tipBone,
float targetX,
150 float targetY,
float targetZ,
float poleX,
float poleY,
float poleZ,
float weight);
152 std::vector<TransformTRS> locals_;
153 std::vector<TransformTRS> worlds_;
#define EVENGINE_API_WORLD
Evaluated local (and optional world) pose for an AnimSkeleton. Script type: AnimPose.
AnimPose()=default
Anim pose.
AnimPose(const AnimPose &)=delete
~AnimPose()=default
Anim pose.
AnimPose(AnimPose &&) noexcept=default
Anim pose.
AnimPose & operator=(const AnimPose &)=delete
3D bone hierarchy + bind-pose local TRS for skeletal animation. Independent of ik::Skeleton3D (FABRIK...