37 void setFrequency(
float frequencyHz);
41 void setDamping(
float dampingZeta);
45 void setResponse(
float response);
50 void setIntegrator(
const std::string &
kind);
52 std::string getIntegrator()
const;
55 void setBoneWeight(
int boneIndex,
float weight);
57 float getBoneWeight(
int boneIndex)
const;
72 void update(
float dt);
75 enum class Integrator { SecondOrder, Spring, Pd };
93 void ensureBones(
int count);
94 void stepScalar(
float dt,
float xd, ScalarState &
s);
95 void writePoseFromState();
96 void readTargetIntoState(
const AnimPose *
target,
bool snap);
98 AnimSkeleton *skeleton_ =
nullptr;
102 float frequencyHz_ = 3.f;
103 float dampingZeta_ = 1.f;
104 float response_ = 1.f;
105 Integrator integrator_ = Integrator::SecondOrder;
106 SecondOrderCoeffs coeffs_{};
110 std::vector<BoneState> bones_;
111 bool hasTarget_ =
false;
113 bool hasLastTick_ =
false;
115 void updateUnchecked(
float dt);
#define EVENGINE_API_WORLD
Common time values and an injectable deterministic simulation clock.
Move-only operation result carrying either a value or Status.
Evaluated local (and optional world) pose for an AnimSkeleton. Script type: AnimPose.
3D bone hierarchy + bind-pose local TRS for skeletal animation. Independent of ik::Skeleton3D (FABRIK...
Control-theory procedural pose driver: tracks a target AnimPose with per-channel second-order / sprin...
ControlPose(const ControlPose &)=delete
AnimSkeleton * getSkeleton() const
Returns the skeleton.
float getFrequency() const
Returns the frequency.
ControlPose & operator=(const ControlPose &)=delete
float getDamping() const
Returns the damping.
~ControlPose()=default
Control pose.
float getResponse() const
Returns the response.
static constexpr StrongUint64 zero() noexcept
Returns the zero value for this strong type.
One deterministic fixed-step emitted by SimulationClock.