30 int getBoneCount()
const;
34 int getParent(
int boneId)
const;
36 int getChildCount(
int boneId)
const;
38 int getChild(
int boneId,
int childIndex)
const;
41 float getLength(
int boneId)
const;
43 void setLength(
int boneId,
float length);
46 void setPosition(
int boneId,
float x,
float y);
48 float getX(
int boneId)
const;
50 float getY(
int boneId)
const;
53 void setOrientation(
int boneId,
float x,
float y);
55 float getOrientationX(
int boneId)
const;
57 float getOrientationY(
int boneId)
const;
60 void setRotation(
int boneId,
float angle);
62 float getRotation(
int boneId)
const;
65 void setConstraints(
int boneId,
float minAngle,
float maxAngle);
67 void clearConstraints(
int boneId);
69 bool hasConstraints(
int boneId)
const;
72 void initStraightPose(
float rootX = 0.f,
float rootY = 0.f);
76 void forwardKinematics();
78 void updateRotations();
81 float totalLengthTo(
int boneId)
const;
86 std::unique_ptr<Impl> impl_;
88 void requireBone(
int boneId)
const;
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Script-facing 2D skeleton + pose state. Bone indices are stable after each createBone / topological r...
~Skeleton2D()
Releases skeleton and pose state.
int getRootId() const
Root bone id (always 0).
Skeleton2D & operator=(const Skeleton2D &)=delete
Skeleton2D(const Skeleton2D &)=delete
FABRIK solver for Skeleton2D. Script type: Solver2D.