Navigation
API > API/Runtime > API/Runtime/Chaos
Calculate new positions and rotations for a pair of bodies connected by a joint.
This solver treats of the 6 possible constraints (up to 3 linear and 3 angular) individually and resolves them in sequence.
| Name | FPBDJointSolver |
| Type | class |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Joint/PBDJointSolverGaussSeidel.h |
| Include Path | #include "Chaos/Joint/PBDJointSolverGaussSeidel.h" |
Syntax
class FPBDJointSolver
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPBDJointSolver() |
Chaos/Joint/PBDJointSolverGaussSeidel.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| MaxConstrainedBodies | const int32 | Chaos/Joint/PBDJointSolverGaussSeidel.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AngleTolerance | FReal | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| AngularHardLambda | FVec3 | Lagrange multipliers of the rotation constraints Currently these are used in ApplyAngularVelocityConstraints | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| AngularViolation | FReal | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| bIsBroken | bool | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| bIsViolating | bool | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| ConditionedInvILs | FVec3 | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| ConditionedInvMs | FReal | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| ConnectorRs | FRotation3 | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| ConnectorXs | FVec3 | World-space constraint settings. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| InitConnectorRs | FRotation3 | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| InitConnectorXs | FVec3 | XPBD Initial iteration world-space body state. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| InitConstraintAxisAngularVelocities | FVec3 | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| InitConstraintAxisLinearVelocities | FVec3 | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| InvIs | FMatrix33 | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| InvMs | FReal | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| InvMScales | FReal | Conditioned InvM and InvI. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| LastPs | FVec3 | Tracking whether the solver is resolved. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| LastQs | FRotation3 | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| LinearDriveLambdas | FVec3 | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| LinearHardLambda | FVec3 | Lagrange multipliers of the position constraints. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| LinearSoftLambda | FReal | XPBD Accumulators (net impulse for each soft constraint/drive) | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| LinearViolationSq | FReal | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| LocalConnectorXs | FRigidTransform3 | Local-space constraint settings. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| NetAngularImpulse | FVec3 | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| NetLinearImpulse | FVec3 | Accumulated Impulse and AngularImpulse (Impulse * Dt since they are mass multiplied position corrections) | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| PositionTolerance | FReal | Tolerances below which we stop solving. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| RotationDriveLambdas | FVec3 | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| SolverBodies | FConstraintSolverBody | The cached body state on which the joint operates. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| SolverStiffness | FReal | Solver stiffness - increased over iterations for stability | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
| SwingSoftLambda | FReal | Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| TwistSoftLambda | FReal | Chaos/Joint/PBDJointSolverGaussSeidel.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyConstraints
(
const FReal Dt, |
Run the position solve for the constraints. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
void ApplyProjections
(
const FReal Dt, |
Apply projection (a position solve where the parent has infinite mass) for the constraints | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
void ApplyVelocityConstraints
(
const FReal Dt, |
Run the velocity solve for the constraints. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
FConstraintSolverBody & Body
(
int32 BodyIndex |
Access to the SolverBodies that the constraint is operating on. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
const FConstraintSolverBody & Body
(
int32 BodyIndex |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| Chaos/Joint/PBDJointSolverGaussSeidel.h | |||
const FConstraintSolverBody & Body0 () |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
| Chaos/Joint/PBDJointSolverGaussSeidel.h | |||
const FConstraintSolverBody & Body1 () |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
void Deinit() |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
FReal GetAngularViolation() |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
FReal GetLinearViolationSq() |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
const FVec3 & GetNetAngularImpulse() |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
const FVec3 & GetNetLinearImpulse() |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
void Init
(
const FReal Dt, |
Called once per frame to initialze the joint solver from the joint settings. | Chaos/Joint/PBDJointSolverGaussSeidel.h | |
FMatrix33 InvI
(
int32 BodyIndex |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
FReal InvM
(
int32 BodyIndex |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
bool IsBroken() |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
bool IsDynamic
(
int32 BodyIndex |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
bool IsViolating() |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
const FVec3 P
(
int BodyIndex |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
const FRotation3 Q
(
int BodyIndex |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
const FRotation3 & R
(
int BodyIndex |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
bool RequiresSolve() |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
void SetIsBroken
(
const bool bInIsBroken |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
void SetIsViolating
(
const bool bInIsViolating |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
void SetShockPropagationScales
(
const FReal InvMScale0, |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
void SetSolverBodies
(
FSolverBody* SolverBody0, |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
void Update
(
const FReal Dt, |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
void UpdateMasses
(
const FReal InvMassScale0, |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
FVec3 V
(
int BodyIndex |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
FVec3 W
(
int BodyIndex |
Chaos/Joint/PBDJointSolverGaussSeidel.h | ||
const FVec3 & X
(
int BodyIndex |
Chaos/Joint/PBDJointSolverGaussSeidel.h |
See Also
- FJointSolverCholesky