56 [[nodiscard]]
int getSupportBone()
const;
63 [[nodiscard]]
int getBalanceBone()
const;
70 [[nodiscard]]
float getBoneMass(
int boneIndex)
const;
77 [[nodiscard]]
eve::Result<void> setRecovery(
float frequencyHz,
float dampingZeta);
78 [[nodiscard]]
float getRecoveryFrequency()
const;
79 [[nodiscard]]
float getRecoveryDamping()
const;
85 [[nodiscard]]
float getRecoilFrequency()
const;
86 [[nodiscard]]
float getRecoilDamping()
const;
90 [[nodiscard]]
float getGravity()
const;
94 [[nodiscard]]
float getPendulumHeight()
const;
98 [[nodiscard]]
float getInertia()
const;
102 [[nodiscard]]
float getRecoilInertia()
const;
106 [[nodiscard]]
float getMaxLean()
const;
125 [[nodiscard]]
eve::Result<void> applyImpulse(
int boneIndex,
float impulseX,
float impulseY,
float impulseZ,
126 float pointX,
float pointY,
float pointZ);
134 void update(
float dt);
147 [[nodiscard]]
AnimPose* getTargetPose();
149 [[nodiscard]]
float getLeanX()
const;
150 [[nodiscard]]
float getLeanZ()
const;
151 [[nodiscard]]
float getLeanVelocityX()
const;
152 [[nodiscard]]
float getLeanVelocityZ()
const;
153 [[nodiscard]]
float getCenterOfMassX()
const;
154 [[nodiscard]]
float getCenterOfMassY()
const;
155 [[nodiscard]]
float getCenterOfMassZ()
const;
156 [[nodiscard]]
float getSupportX()
const;
157 [[nodiscard]]
float getSupportY()
const;
158 [[nodiscard]]
float getSupportZ()
const;
162 float x = 0.f,
y = 0.f,
z = 0.f;
163 float vx = 0.f,
vy = 0.f,
vz = 0.f;
164 float pendingTx = 0.f, pendingTy = 0.f, pendingTz = 0.f;
168 void resetDynamics();
169 void writeOverlayPose();
170 void refreshDiagnostics();
171 void updateUnchecked(
float dt);
172 [[nodiscard]]
bool boneInRange(
int boneIndex)
const;
179 int supportBone_ = 0;
180 int balanceBone_ = 0;
181 float recoveryHz_ = 2.f;
182 float recoveryZeta_ = 0.45f;
183 float recoilHz_ = 4.f;
184 float recoilZeta_ = 0.5f;
185 float gravity_ = 9.81f;
186 float pendulumHeight_ = 1.f;
187 float inertia_ = 1.f;
188 float recoilInertia_ = 0.15f;
189 float maxLean_ = 0.7f;
191 float leanX_ = 0.f, leanZ_ = 0.f;
192 float leanVelX_ = 0.f, leanVelZ_ = 0.f;
193 float pendingLeanTx_ = 0.f, pendingLeanTz_ = 0.f;
195 float comX_ = 0.f, comY_ = 0.f, comZ_ = 0.f;
196 float supportX_ = 0.f, supportY_ = 0.f, supportZ_ = 0.f;
198 std::vector<float> masses_;
199 std::vector<Recoil> recoils_;
200 bool hasTarget_ =
false;
202 bool hasLastTick_ =
false;
#define EVENGINE_API_WORLD
Move-only, checked operation results for the common layer.
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...
Authored-pose overlay that wobbles from world impulses and recovers balance.
PhysicalBalancePose & operator=(const PhysicalBalancePose &)=delete
~PhysicalBalancePose()=default
Physical balance pose.
PhysicalBalancePose(const PhysicalBalancePose &)=delete
static constexpr StrongUint64 zero() noexcept
Returns the zero value for this strong type.
One deterministic fixed-step emitted by SimulationClock.