23 void setKeepTrace(
bool keep);
25 bool getKeepTrace()
const;
30 int getMaxIterations()
const;
32 void setTolerance(
float tol);
34 float getTolerance()
const;
36 void setForce(
float force);
38 float getForce()
const;
41 void setInfluence(
float influence);
43 float getInfluence()
const;
48 void addTarget(
int boneId,
float x,
float y,
float z,
float weight = 1.f);
50 int getTargetCount()
const;
62 bool solveChain(
Skeleton3D *skeleton,
int rootBoneId,
int tipBoneId);
64 void stepChain(
Skeleton3D *skeleton,
int rootBoneId,
int tipBoneId,
float dt = 1.f);
71 void setPole(
float x,
float y,
float z,
float weight);
77 float getPoleWeight()
const;
84 void setTipRotation(
int boneId,
float yaw,
float pitch,
float weight);
86 void clearTipRotation();
88 float getTipRotationWeight()
const;
91 int getTraceSize()
const;
96 bool solveChainImpl(
Skeleton3D *skeleton,
int rootBoneId,
int tipBoneId,
100 ::ik::solver3d solver_;
101 bool keepTrace_ =
false;
102 int maxIterations_ = 16;
103 float tolerance_ = 1e-3f;
105 float influence_ = 1.f;
107 bool usePole_ =
false;
109 float poleWeight_ = 1.f;
113 float tipPitch_ = 0.f;
114 float tipRotWeight_ = 0.f;
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
const SquirrelValueOptions & options
Script-facing 3D skeleton + pose state (ik::skeleton3d + ik::ecs3d). Local angles are yaw/pitch in th...
FABRIK solver for Skeleton3D. Script type: Solver3D.
Solver3D(const Solver3D &)=delete
Solver3D()=default
Creates a 3D FABRIK solver with default tolerances.
~Solver3D()=default
Releases solver state.
Solver3D & operator=(const Solver3D &)=delete
Options shared by the chain-scoped FABRIK solve used by Solver2D / Solver3D. These mirror the knobs o...