![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SolverBody.h>
Public Member Functions | |
| FSolverBody () | |
| void | Reset () |
| void | SetImplicitVelocity (FReal Dt) |
| Calculate and set the velocity and angular velocity from the net transform delta. | |
| FSolverReal | InvM () const |
| Get the inverse mass. | |
| void | SetInvM (FReal InInvM) |
| Set the inverse mass. | |
| const FSolverMatrix33 & | InvI () const |
| Get the world-space inverse inertia. | |
| void | SetInvI (const FMatrix33 &InInvI) |
| Set the world-space inverse inertia. | |
| const FSolverVec3 & | InvILocal () const |
| Get the local-space inverse inertia (diagonal elements) | |
| void | SetInvILocal (const FVec3 &InInvILocal) |
| Set the local-space inverse inertia (diagonal elements) | |
| FRigidTransform3 | CoMTransform () const |
| The current CoM transform. | |
| const FVec3 & | X () const |
| Pre-integration world-space center of mass position. | |
| void | SetX (const FVec3 &InX) |
| const FRotation3 & | R () const |
| Pre-integration world-space center of mass rotation. | |
| void | SetR (const FRotation3 &InR) |
| const FVec3 & | P () const |
| Predicted (post-integrate) world-space center of mass position. | |
| void | SetP (const FVec3 &InP) |
| const FRotation3 & | Q () const |
| Predicted (post-integrate) world-space center of mass rotation. | |
| void | SetQ (const FRotation3 &InQ) |
| const FSolverVec3 & | V () const |
| World-space center of mass velocity. | |
| void | SetV (const FVec3 &InV) |
| const FSolverVec3 & | W () const |
| World-space center of mass angular velocity. | |
| void | SetW (const FVec3 &InW) |
| const FVec3 & | CoM () const |
| void | SetCoM (const FVec3 &InCoM) |
| const FRotation3 & | RoM () const |
| void | SetRoM (const FRotation3 &InRoM) |
| const FSolverVec3 & | DP () const |
| Net world-space position displacement applied by the constraints. | |
| void | SetDP (const FSolverVec3 &InDP) |
| const FSolverVec3 & | DQ () const |
| Net world-space rotation displacement applied by the constraints (axis-angle vector equivalent to angular velocity but for position) | |
| void | SetDQ (const FSolverVec3 &InDQ) |
| const FSolverVec3 & | CP () const |
| Net world-space position correction applied by the constraints. | |
| const FSolverVec3 & | CQ () const |
| Net world-space rotation correction applied by the constraints (axis-angle vector equivalent to angular velocity but for position) | |
| FVec3 | CorrectedP () const |
| World-space position after applying the net correction DP() | |
| FRotation3 | CorrectedQ () const |
| World-space rotation after applying the net correction DQ() | |
| void | ApplyCorrections () |
| Apply the accumulated position and rotation corrections to the predicted P and Q This is only used by unit tests that reuse solver bodies between ticks. | |
| FVec3 | ActorP () const |
| Get the world-space Actor position. | |
| FRotation3 | ActorQ () const |
| Get the world-space Actor rotation. | |
| FVec3 | CorrectedActorP () const |
| Get the current world-space Actor position. | |
| FRotation3 | CorrectedActorQ () const |
| Get the current world-space Actor rotation. | |
| int32 | Level () const |
| Contact graph level. This is used in shock propagation to determine which of two bodies should have its inverse mass scaled. | |
| void | SetLevel (int32 InLevel) |
| bool | IsDynamic () const |
| Whether the body has a finite mass. | |
| void | ApplyTransformDelta (const FSolverVec3 &DP, const FSolverVec3 &DR) |
| Apply a world-space position and rotation delta to the body center of mass, and update inverse mass. | |
| void | ApplyPositionDelta (const FSolverVec3 &DP) |
| Apply a world-space position delta to the solver body center of mass. | |
| void | ApplyRotationDelta (const FSolverVec3 &DR) |
| Apply a world-space rotation delta to the solver body and update the inverse mass. | |
| void | ApplyPositionCorrectionDelta (const FSolverVec3 &CP) |
| Apply a world-space position correction delta to the solver body center of mass This will translate the body without introducing linear velocity. | |
| void | ApplyRotationCorrectionDelta (const FSolverVec3 &CR) |
| Apply a world-space rotation correction delta to the solver body This will rotate the body without introducing angular velocity. | |
| void | ApplyVelocityDelta (const FSolverVec3 &DV, const FSolverVec3 &DW) |
| Apply a world-space velocity delta to the solver body. | |
| void | ApplyLinearVelocityDelta (const FSolverVec3 &DV) |
| Apply a world-space linear velocity delta to the solver body. | |
| void | ApplyAngularVelocityDelta (const FSolverVec3 &DW) |
| Apply an world-space angular velocity delta to the solver body. | |
| void | EnforceShortestRotationTo (const FRotation3 &InQ) |
| Update the rotation to be in the same hemisphere as the provided quaternion. This is used by joints with angular constraint/drives. | |
| void | UpdateRotationDependentState () |
| Update cached state that depends on rotation (i.e., world space inertia) | |
| void | PrefetchPositionSolverData () const |
| void | PrefetchVelocitySolverData () const |
Static Public Member Functions | |
| static constexpr FSolverReal | ZeroMassThreshold () |
| static FSolverBody | MakeInitialized () |
| static FSolverBody | MakeUninitialized () |
Used by the constraint solver loop to cache all state for a particle and accumulate solver results. Uses a gather/scatter mechanism to read/write data to the particle SOAs at the beginning/end of the constraint solve. Constraint solver algorithms, and collision Update functions are implemented to use FSolverBody, and do not directly read/write to the particle handles. Constraint Solvers will modify P(), Q(), V() and W() via ApplyTransformDelta() and other methods.
There is one SolverBody for each particle in an island. Most constraint solvers will actually wrap the FSolverBody in FConstraintSolverBody, which allows us to apply per-constraint modifiers to the Solver Body.
|
inline |
Create an empty solver body. All properties are uninitialized.
|
inline |
Get the world-space Actor position.
|
inline |
Get the world-space Actor rotation.
|
inline |
Apply an world-space angular velocity delta to the solver body.
|
inline |
Apply the accumulated position and rotation corrections to the predicted P and Q This is only used by unit tests that reuse solver bodies between ticks.
|
inline |
Apply a world-space linear velocity delta to the solver body.
|
inline |
Apply a world-space position correction delta to the solver body center of mass This will translate the body without introducing linear velocity.
|
inline |
Apply a world-space position delta to the solver body center of mass.
|
inline |
Apply a world-space rotation correction delta to the solver body This will rotate the body without introducing angular velocity.
|
inline |
Apply a world-space rotation delta to the solver body and update the inverse mass.
|
inline |
Apply a world-space position and rotation delta to the body center of mass, and update inverse mass.
|
inline |
Apply a world-space velocity delta to the solver body.
|
inline |
|
inline |
The current CoM transform.
|
inline |
Get the current world-space Actor position.
|
inline |
Get the current world-space Actor rotation.
|
inline |
|
inline |
|
inline |
Net world-space position correction applied by the constraints.
|
inline |
Net world-space rotation correction applied by the constraints (axis-angle vector equivalent to angular velocity but for position)
|
inline |
Net world-space position displacement applied by the constraints.
|
inline |
Net world-space rotation displacement applied by the constraints (axis-angle vector equivalent to angular velocity but for position)
|
inline |
Update the rotation to be in the same hemisphere as the provided quaternion. This is used by joints with angular constraint/drives.
|
inline |
Get the world-space inverse inertia.
|
inline |
Get the local-space inverse inertia (diagonal elements)
|
inline |
Get the inverse mass.
|
inline |
Whether the body has a finite mass.
|
inline |
Contact graph level. This is used in shock propagation to determine which of two bodies should have its inverse mass scaled.
|
inlinestatic |
A factory method to create a safely initialized Solverbody. The defaultconstructor assumes you are going to set all properties manually.
|
inlinestatic |
Create an empty solver body. All properties are uninitialized.
|
inline |
Predicted (post-integrate) world-space center of mass position.
|
inline |
|
inline |
|
inline |
Predicted (post-integrate) world-space center of mass rotation.
|
inline |
Pre-integration world-space center of mass rotation.
|
inline |
Reset the solver accumulators
|
inline |
|
inline |
|
inline |
Calculate and set the velocity and angular velocity from the net transform delta.
Set the world-space inverse inertia.
Set the local-space inverse inertia (diagonal elements)
|
inline |
|
inline |
|
inline |
| void Chaos::FSolverBody::UpdateRotationDependentState | ( | ) |
Update cached state that depends on rotation (i.e., world space inertia)
|
inline |
World-space center of mass velocity.
|
inline |
World-space center of mass angular velocity.
|
inline |
Pre-integration world-space center of mass position.
|
inlinestaticconstexpr |