27 int getBoneCount()
const;
31 int getParent(
int boneId)
const;
33 int getChildCount(
int boneId)
const;
35 int getChild(
int boneId,
int childIndex)
const;
38 float getLength(
int boneId)
const;
40 void setLength(
int boneId,
float length);
43 void setPosition(
int boneId,
float x,
float y,
float z);
45 float getX(
int boneId)
const;
47 float getY(
int boneId)
const;
49 float getZ(
int boneId)
const;
52 void setOrientation(
int boneId,
float x,
float y,
float z);
54 float getOrientationX(
int boneId)
const;
56 float getOrientationY(
int boneId)
const;
58 float getOrientationZ(
int boneId)
const;
61 void setRotation(
int boneId,
float yaw,
float pitch);
63 float getRotationYaw(
int boneId)
const;
65 float getRotationPitch(
int boneId)
const;
68 void setConstraints(
int boneId,
float minYaw,
float minPitch,
float maxYaw,
71 void clearConstraints(
int boneId);
73 bool hasConstraints(
int boneId)
const;
76 void initStraightPose(
float rootX = 0.f,
float rootY = 0.f,
float rootZ = 0.f);
80 void forwardKinematics();
82 void updateRotations();
85 float totalLengthTo(
int boneId)
const;
87 ::ik::skeleton3d &
native() {
return sk_; }
88 ::ik::ecs3d &
state() {
return state_; }
89 const ::ik::skeleton3d &
native()
const {
return sk_; }
90 const ::ik::ecs3d &
state()
const {
return state_; }
94 void ensureStateSize();
95 ::ik::bone3d *boneAt(
int boneId)
const;
96 void requireBone(
int boneId)
const;
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Script-facing 3D skeleton + pose state (ik::skeleton3d + ik::ecs3d). Local angles are yaw/pitch in th...
::ik::skeleton3d & native()
const ::ik::ecs3d & state() const
~Skeleton3D()=default
Releases skeleton and pose state.
const ::ik::skeleton3d & native() const
Skeleton3D & operator=(const Skeleton3D &)=delete
Skeleton3D(const Skeleton3D &)=delete
int getRootId() const
Root bone id (always 0).