Navigation
API > API/Runtime > API/Runtime/Chaos
A set of joint restricting up to 6 degrees of freedom, with linear and angular limits.
| Name | FPBDJointConstraints |
| Type | class |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/PBDJointConstraints.h |
| Include Path | #include "Chaos/PBDJointConstraints.h" |
Syntax
class FPBDJointConstraints : public Chaos::FPBDConstraintContainer
Inheritance Hierarchy
- FPBDConstraintContainer → FPBDJointConstraints
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPBDJointConstraints() |
Chaos/PBDJointConstraints.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FPBDJointConstraints() |
Chaos/PBDJointConstraints.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Base | FPBDConstraintContainer | Chaos/PBDJointConstraints.h | |
| FConstraintContainerHandle | FPBDJointConstraintHandle | Chaos/PBDJointConstraints.h | |
| FConstraintHandleAllocator | TConstraintHandleAllocator< FPBDJointConstraints > | Chaos/PBDJointConstraints.h | |
| FHandles | TArray< FConstraintContainerHandle * > | Chaos/PBDJointConstraints.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bJointsDirty | bool | Chaos/PBDJointConstraints.h | ||
| BreakCallback | FJointBreakCallback | Chaos/PBDJointConstraints.h | ||
| bUseLinearSolver | bool | Chaos/PBDJointConstraints.h | ||
| ConstraintParticles | TArray< FParticlePair > | Chaos/PBDJointConstraints.h | ||
| ConstraintSettings | TArray< FPBDJointSettings > | Chaos/PBDJointConstraints.h | ||
| ConstraintStates | TArray< FPBDJointState > | Chaos/PBDJointConstraints.h | ||
| HandleAllocator | FConstraintHandleAllocator | Chaos/PBDJointConstraints.h | ||
| Handles | FHandles | Chaos/PBDJointConstraints.h | ||
| Settings | FPBDJointSolverSettings | Chaos/PBDJointConstraints.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddBodies
(
const TArrayView< int32 >& ConstraintIndices, |
Chaos/PBDJointConstraints.h | ||
void AddBodies
(
FSolverBodyContainer& SolverBodyContainer |
Chaos/PBDJointConstraints.h | ||
FConstraintContainerHandle * AddConstraint
(
const FParticlePair& InConstrainedParticles, |
Add a constraint with particle-space constraint offsets. | Chaos/PBDJointConstraints.h | |
FConstraintContainerHandle * AddConstraint
(
const FParticlePair& InConstrainedParticles, |
Chaos/PBDJointConstraints.h | ||
FConstraintContainerHandle * AddConstraint
(
const FParticlePair& InConstrainedParticles, |
Chaos/PBDJointConstraints.h | ||
void ApplyPositionConstraints
(
const FReal Dt, |
Chaos/PBDJointConstraints.h | ||
void ApplyPositionConstraints
(
const TArrayView< int32 >& ConstraintIndices, |
Chaos/PBDJointConstraints.h | ||
void ApplyProjectionConstraints
(
const FReal Dt, |
Chaos/PBDJointConstraints.h | ||
void ApplyProjectionConstraints
(
const TArrayView< int32 >& ConstraintIndices, |
Chaos/PBDJointConstraints.h | ||
void ApplyVelocityConstraints
(
const FReal Dt, |
Chaos/PBDJointConstraints.h | ||
void ApplyVelocityConstraints
(
const TArrayView< int32 >& ConstraintIndices, |
Chaos/PBDJointConstraints.h | ||
void BreakConstraint
(
int32 ConstraintIndex |
Force a constraints to break | Chaos/PBDJointConstraints.h | |
void ClearBreakCallback() |
Remove the previously assigned break callback. | Chaos/PBDJointConstraints.h | |
void ClearConstraintBreaking
(
int32 ConstraintIndex |
Clear the transient constraint braking state (called by event system when it has used the flag) | Chaos/PBDJointConstraints.h | |
void ClearConstraintViolating
(
int32 ConstraintIndex |
Clear the transient constraint violation state (called by event system when it has used the flag) | Chaos/PBDJointConstraints.h | |
void ClearDriveTargetChanged
(
int32 ConstraintIndex |
Clear the drive target state | Chaos/PBDJointConstraints.h | |
void FixConstraint
(
int32 ConstraintIndex |
Repair a broken constraints (does not adjust particle positions) | Chaos/PBDJointConstraints.h | |
void GatherInput
(
const FReal Dt |
Chaos/PBDJointConstraints.h | ||
void GatherInput
(
const TArrayView< int32 >& ConstraintIndices, |
Chaos/PBDJointConstraints.h | ||
void GatherInput
(
const int32 ConstraintIndex, |
Chaos/PBDJointConstraints.h | ||
const FHandles & GetConstConstraintHandles() |
All of the constraints in the container, including inactive | Chaos/PBDJointConstraints.h | |
const FParticlePair & GetConstrainedParticles
(
int32 ConstraintIndex |
Get the particles that are affected by the specified constraint. | Chaos/PBDJointConstraints.h | |
FVec3 GetConstraintAngularImpulse
(
int32 ConstraintIndex |
The total linear angular applied by the constraint | Chaos/PBDJointConstraints.h | |
float GetConstraintAngularViolation
(
int32 ConstraintIndex |
Chaos/PBDJointConstraints.h | ||
int32 GetConstraintColor
(
int32 ConstraintIndex |
Chaos/PBDJointConstraints.h | ||
const FConstraintContainerHandle * GetConstraintHandle
(
int32 ConstraintIndex |
Get a joint constraint by index | Chaos/PBDJointConstraints.h | |
FConstraintContainerHandle * GetConstraintHandle
(
int32 ConstraintIndex |
Get a joint constraint by index | Chaos/PBDJointConstraints.h | |
FHandles & GetConstraintHandles() |
All of the constraints in the container, including inactive | Chaos/PBDJointConstraints.h | |
int32 GetConstraintIsland
(
int32 ConstraintIndex |
Chaos/PBDJointConstraints.h | ||
int32 GetConstraintLevel
(
int32 ConstraintIndex |
Chaos/PBDJointConstraints.h | ||
FVec3 GetConstraintLinearImpulse
(
int32 ConstraintIndex |
The total linear impulse applied by the constraint | Chaos/PBDJointConstraints.h | |
float GetConstraintLinearViolation
(
int32 ConstraintIndex |
Chaos/PBDJointConstraints.h | ||
EResimType GetConstraintResimType
(
int32 ConstraintIndex |
Chaos/PBDJointConstraints.h | ||
const FPBDJointSettings & GetConstraintSettings
(
int32 ConstraintIndex |
Get the settings for a joint constraint by index | Chaos/PBDJointConstraints.h | |
ESyncState GetConstraintSyncState
(
int32 ConstraintIndex |
Chaos/PBDJointConstraints.h | ||
const FPBDJointSolverSettings & GetSettings() |
Get the solver settings (used by TPBDJointContainerSolver) | Chaos/PBDJointConstraints.h | |
bool GetUseLinearSolver() |
Chaos/PBDJointConstraints.h | ||
bool IsConstraintBreaking
(
int32 ConstraintIndex |
Whether the constraint was broken this frame (transient flag for use by event system) | Chaos/PBDJointConstraints.h | |
bool IsConstraintBroken
(
int32 ConstraintIndex |
Whether the constraint is broken | Chaos/PBDJointConstraints.h | |
bool IsConstraintEnabled
(
int32 ConstraintIndex |
Whether the constraint is enabled | Chaos/PBDJointConstraints.h | |
bool IsConstraintEnabledDuringResim
(
int32 ConstraintIndex |
Chaos/PBDJointConstraints.h | ||
bool IsConstraintViolating
(
int32 ConstraintIndex |
Whether the constraint was violated beyond a threshold this frame (transient flag for use by event system) | Chaos/PBDJointConstraints.h | |
bool IsDriveTargetChanged
(
int32 ConstraintIndex |
Whether the drive target has changed | Chaos/PBDJointConstraints.h | |
void MarkJointsDirty() |
This will force a re-evaluation of the sorting of constraints - needed if objects switch between kinematic/dynamic, for example. | Chaos/PBDJointConstraints.h | |
int32 NumConstraints() |
Get the number of constraints. | Chaos/PBDJointConstraints.h | |
void RemoveConstraint
(
int ConstraintIndex |
Remove the specified constraint. | Chaos/PBDJointConstraints.h | |
void RemoveConstraints
(
const TSet< TGeometryParticleHandle< FReal, 3 >* >& RemovedParticles |
Chaos/PBDJointConstraints.h | ||
void ScatterOutput
(
const int32 ConstraintIndex, |
Chaos/PBDJointConstraints.h | ||
void ScatterOutput
(
const TArrayView< int32 >& ConstraintIndices, |
Chaos/PBDJointConstraints.h | ||
void ScatterOutput
(
const FReal Dt |
Chaos/PBDJointConstraints.h | ||
void SetAngularDrivePositionTarget
(
int32 ConstraintIndex, |
Set the angular drive target for a constraint by index | Chaos/PBDJointConstraints.h | |
void SetBreakCallback
(
const FJointBreakCallback& Callback |
Set the break callback. | Chaos/PBDJointConstraints.h | |
void SetConstraintEnabled
(
int32 ConstraintIndex, |
Enable or disable a constraints | Chaos/PBDJointConstraints.h | |
void SetConstraintEnabledDuringResim
(
int32 ConstraintIndex, |
Chaos/PBDJointConstraints.h | ||
void SetConstraintSettings
(
int32 ConstraintIndex, |
Set the settings for a joint constraint by index | Chaos/PBDJointConstraints.h | |
void SetConstraintState
(
int32 ConstraintIndex, |
Chaos/PBDJointConstraints.h | ||
void SetConstraintSyncState
(
int32 ConstraintIndex, |
Chaos/PBDJointConstraints.h | ||
void SetDriveTargetChanged
(
int32 ConstraintIndex, |
Set Drive Target Changed State | Chaos/PBDJointConstraints.h | |
void SetLinearDrivePositionTarget
(
int32 ConstraintIndex, |
Set the linear drive target for a constraint by index | Chaos/PBDJointConstraints.h | |
void SetSettings
(
const FPBDJointSolverSettings& InSettings |
Modify the solver settings | Chaos/PBDJointConstraints.h | |
void SetSolverResults
(
const int32 ConstraintIndex, |
Called by the joint solver at the end of the constraint solver phase. | Chaos/PBDJointConstraints.h | |
void SetSortEnabled
(
const bool bInEnable |
Whether to sort the joints internally. | Chaos/PBDJointConstraints.h | |
void SetUseLinearJointSolver
(
const bool bInEnable |
Whether to use a linear or non-linear joint solver. | Chaos/PBDJointConstraints.h | |
void SetUseLinearSolver
(
const bool bUseLinearSolverIn |
Chaos/PBDJointConstraints.h | ||
void SetUseLinearSolver
(
int32 ConstraintIndex, |
Set the option to use linear solver for a constraint by index | Chaos/PBDJointConstraints.h | |
void SetUseSimd
(
const bool bInEnable |
Whether to use simd in single precision on the linear joint solver. | Chaos/PBDJointConstraints.h |
Overridden from FPBDConstraintContainer
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddConstraintsToGraph
(
Private::FPBDIslandManager& IslandManager |
Add all the constraints in the container to the graph | Chaos/PBDJointConstraints.h | |
virtual TUniquePtr< FConstraintContainerSolver > CreateGroupSolver
(
const int32 Priority |
Create a constraint solver for an Evolution with Graph support (World evolution). | Chaos/PBDJointConstraints.h | |
virtual TUniquePtr< FConstraintContainerSolver > CreateSceneSolver
(
const int32 Priority |
FConstraintContainer Implementation | Chaos/PBDJointConstraints.h | |
virtual void DisconnectConstraints
(
const TSet< TGeometryParticleHandle< FReal, 3 >* >& RemovedParticles |
Disconnect the constraints from the attached input particles. | Chaos/PBDJointConstraints.h | |
virtual int32 GetNumConstraints() |
Get the number of constraints in this container (includes inactive and disabled) | Chaos/PBDJointConstraints.h | |
virtual void PrepareTick() |
Called oncer per tick to initialize buffers required for the rest of the tick | Chaos/PBDJointConstraints.h | |
virtual void ResetConstraints() |
Empty the constraints (must be removed from the graph first, if required) | Chaos/PBDJointConstraints.h | |
virtual void UnprepareTick() |
Should undo any allocations in PrepareTick | Chaos/PBDJointConstraints.h |