42 void DisableParentChildCollisions(
const Mat44 *inJointMatrices =
nullptr,
float inMinSeparationDistance = 0.0f);
48 void SaveBinaryState(
StreamOut &inStream,
bool inSaveShapes,
bool inSaveGroupFilter)
const;
64 void CalculateBodyIndexToConstraintIndex();
74 void CalculateConstraintIndexToBodyIdxPair();
143 void AddToPhysicsSystem(
EActivation inActivationMode,
bool inLockBodies =
true);
146 void RemoveFromPhysicsSystem(
bool inLockBodies =
true);
149 void Activate(
bool inLockBodies =
true);
155 bool IsActive(
bool inLockBodies =
true)
const;
161 void SetPose(
const SkeletonPose &inPose,
bool inLockBodies =
true);
164 void SetPose(
RVec3Arg inRootOffset,
const Mat44 *inJointMatrices,
bool inLockBodies =
true);
167 void GetPose(
SkeletonPose &outPose,
bool inLockBodies =
true);
170 void GetPose(
RVec3 &outRootOffset,
Mat44 *outJointMatrices,
bool inLockBodies =
true);
173 void ResetWarmStart();
176 void DriveToPoseUsingKinematics(
const SkeletonPose &inPose,
float inDeltaTime,
bool inLockBodies =
true);
179 void DriveToPoseUsingKinematics(
RVec3Arg inRootOffset,
const Mat44 *inJointMatrices,
float inDeltaTime,
bool inLockBodies =
true);
182 void DriveToPoseUsingMotors(
const SkeletonPose &inPose);
185 void SetLinearAndAngularVelocity(
Vec3Arg inLinearVelocity,
Vec3Arg inAngularVelocity,
bool inLockBodies =
true);
188 void SetLinearVelocity(
Vec3Arg inLinearVelocity,
bool inLockBodies =
true);
191 void AddLinearVelocity(
Vec3Arg inLinearVelocity,
bool inLockBodies =
true);
194 void AddImpulse(
Vec3Arg inImpulse,
bool inLockBodies =
true);
197 void GetRootTransform(
RVec3 &outPosition,
Quat &outRotation,
bool inLockBodies =
true)
const;
218 AABox GetWorldSpaceBounds(
bool inLockBodies =
true)
const;
#define JPH_EXPORT
Definition Core.h:236
std::uint64_t uint64
Definition Core.h:457
#define JPH_NAMESPACE_END
Definition Core.h:379
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
EActivation
Enum used by AddBody to determine if the body needs to be initially active.
Definition EActivation.h:11
@ Activate
Activate the body, making it part of the simulation.
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition Memory.h:31
#define JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(linkage, class_name)
Definition SerializableObject.h:80
Axis aligned box.
Definition AABox.h:16
Settings for constructing a rigid body.
Definition BodyCreationSettings.h:31
ID of a body. This is a way of reasoning about bodies in a multithreaded simulation while avoiding ra...
Definition BodyID.h:13
uint32 GroupID
Definition CollisionGroup.h:24
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition Mat44.h:13
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition NonCopyable.h:11
Definition PhysicsSystem.h:29
Runtime ragdoll information.
Definition Ragdoll.h:132
const TwoBodyConstraint * GetConstraint(int inConstraintIndex) const
Access a constraint by index.
Definition Ragdoll.h:215
size_t GetConstraintCount() const
Get number of constraints in the ragdoll.
Definition Ragdoll.h:209
size_t GetBodyCount() const
Get number of bodies in the ragdoll.
Definition Ragdoll.h:200
TwoBodyConstraint * GetConstraint(int inConstraintIndex)
Access a constraint by index.
Definition Ragdoll.h:212
const Array< BodyID > & GetBodyIDs() const
Access to the array of body IDs.
Definition Ragdoll.h:206
JPH_OVERRIDE_NEW_DELETE Ragdoll(PhysicsSystem *inSystem)
Constructor.
Definition Ragdoll.h:137
BodyID GetBodyID(int inBodyIndex) const
Access a body ID.
Definition Ragdoll.h:203
const RagdollSettings * GetRagdollSettings() const
Get the settings object that created this ragdoll.
Definition Ragdoll.h:221
A constraint that connects two bodies in a ragdoll (for non parent child related constraints)
Definition Ragdoll.h:98
AdditionalConstraint()=default
Constructors.
Ref< TwoBodyConstraintSettings > mConstraint
The constraint that connects these bodies.
Definition Ragdoll.h:107
AdditionalConstraint(int inBodyIdx1, int inBodyIdx2, TwoBodyConstraintSettings *inConstraint)
Definition Ragdoll.h:104
A single rigid body sub part of the ragdoll.
Definition Ragdoll.h:86
Ref< TwoBodyConstraintSettings > mToParent
Definition Ragdoll.h:90
Contains the structure of a ragdoll.
Definition Ragdoll.h:22
const Array< int > & GetBodyIndexToConstraintIndex() const
Definition Ragdoll.h:68
Skeleton * GetSkeleton()
Definition Ragdoll.h:61
int GetConstraintIndexForBodyIndex(int inBodyIndex) const
Map a single body index to a constraint index.
Definition Ragdoll.h:71
pair< int, int > BodyIdxPair
Definition Ragdoll.h:76
const Skeleton * GetSkeleton() const
Access to the skeleton of this ragdoll.
Definition Ragdoll.h:60
const Array< BodyIdxPair > & GetConstraintIndexToBodyIdxPair() const
Table that maps a constraint index (index in mConstraints) to the indices of the bodies that the cons...
Definition Ragdoll.h:79
AdditionalConstraintVector mAdditionalConstraints
A list of constraints that connects two bodies in a ragdoll (for non parent child related constraints...
Definition Ragdoll.h:120
BodyIdxPair GetBodyIndicesForConstraintIndex(int inConstraintIndex) const
Map a single constraint index (index in mConstraints) to the indices of the bodies that the constrain...
Definition Ragdoll.h:82
PartVector mParts
For each of the joints, the body and constraint attaching it to its parent body (1-on-1 with mSkeleto...
Definition Ragdoll.h:117
Ref< Skeleton > mSkeleton
The skeleton for this ragdoll.
Definition Ragdoll.h:114
Definition Reference.h:163
Definition Reference.h:107
Definition Reference.h:35
Helper class that either contains a valid result or an error.
Definition Result.h:12
Resource that contains the joint hierarchy for a skeleton.
Definition Skeleton.h:18
Instance of a skeleton, contains the pose the current skeleton is in.
Definition SkeletonPose.h:18
Simple binary input stream.
Definition StreamIn.h:13
Simple binary output stream.
Definition StreamOut.h:13
Base class for all constraints that involve 2 bodies. Body1 is usually considered the parent,...
Definition TwoBodyConstraint.h:27
Base class for settings for all constraints that involve 2 bodies.
Definition TwoBodyConstraint.h:16