Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
Body.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
19
21
22class StateRecorder;
25
34class alignas(JPH_RVECTOR_ALIGNMENT) JPH_EXPORT_GCC_BUG_WORKAROUND Body : public NonCopyable
35{
36public:
38
40 Body() = default;
41
43 ~Body() { JPH_ASSERT(mMotionProperties == nullptr); }
44
46 inline const BodyID & GetID() const { return mID; }
47
49 inline EBodyType GetBodyType() const { return mBodyType; }
50
52 inline bool IsRigidBody() const { return mBodyType == EBodyType::RigidBody; }
53
55 inline bool IsSoftBody() const { return mBodyType == EBodyType::SoftBody; }
56
58 inline bool IsActive() const { return mMotionProperties != nullptr && mMotionProperties->mIndexInActiveBodies != cInactiveIndex; }
59
61 inline bool IsStatic() const { return mMotionType == EMotionType::Static; }
62
64 inline bool IsKinematic() const { return mMotionType == EMotionType::Kinematic; }
65
67 inline bool IsDynamic() const { return mMotionType == EMotionType::Dynamic; }
68
70 inline bool CanBeKinematicOrDynamic() const { return mMotionProperties != nullptr; }
71
77 inline void SetIsSensor(bool inIsSensor) { JPH_ASSERT(IsRigidBody()); if (inIsSensor) mFlags.fetch_or(uint8(EFlags::IsSensor), memory_order_relaxed); else mFlags.fetch_and(uint8(~uint8(EFlags::IsSensor)), memory_order_relaxed); }
78
80 inline bool IsSensor() const { return (mFlags.load(memory_order_relaxed) & uint8(EFlags::IsSensor)) != 0; }
81
82 // If this sensor detects static objects entering it. Note that the sensor must be kinematic and active for it to detect static objects.
83 inline void SetSensorDetectsStatic(bool inDetectsStatic) { JPH_ASSERT(IsRigidBody()); if (inDetectsStatic) mFlags.fetch_or(uint8(EFlags::SensorDetectsStatic), memory_order_relaxed); else mFlags.fetch_and(uint8(~uint8(EFlags::SensorDetectsStatic)), memory_order_relaxed); }
84
86 inline bool SensorDetectsStatic() const { return (mFlags.load(memory_order_relaxed) & uint8(EFlags::SensorDetectsStatic)) != 0; }
87
90 inline void SetUseManifoldReduction(bool inUseReduction) { JPH_ASSERT(IsRigidBody()); if (inUseReduction) mFlags.fetch_or(uint8(EFlags::UseManifoldReduction), memory_order_relaxed); else mFlags.fetch_and(uint8(~uint8(EFlags::UseManifoldReduction)), memory_order_relaxed); }
91
93 inline bool GetUseManifoldReduction() const { return (mFlags.load(memory_order_relaxed) & uint8(EFlags::UseManifoldReduction)) != 0; }
94
96 inline bool GetUseManifoldReductionWithBody(const Body &inBody2) const { return ((mFlags.load(memory_order_relaxed) & inBody2.mFlags.load(memory_order_relaxed)) & uint8(EFlags::UseManifoldReduction)) != 0; }
97
99 inline EMotionType GetMotionType() const { return mMotionType; }
100 void SetMotionType(EMotionType inMotionType);
101
103 inline BroadPhaseLayer GetBroadPhaseLayer() const { return mBroadPhaseLayer; }
104
106 inline ObjectLayer GetObjectLayer() const { return mObjectLayer; }
107
109 const CollisionGroup & GetCollisionGroup() const { return mCollisionGroup; }
110 CollisionGroup & GetCollisionGroup() { return mCollisionGroup; }
111 void SetCollisionGroup(const CollisionGroup &inGroup) { mCollisionGroup = inGroup; }
112
114 bool GetAllowSleeping() const { return mMotionProperties->mAllowSleeping; }
115 void SetAllowSleeping(bool inAllow);
116
118 inline float GetFriction() const { return mFriction; }
119 void SetFriction(float inFriction) { mFriction = inFriction; }
120
122 inline float GetRestitution() const { return mRestitution; }
123 void SetRestitution(float inRestitution) { mRestitution = inRestitution; }
124
126 inline Vec3 GetLinearVelocity() const { return !IsStatic()? mMotionProperties->GetLinearVelocity() : Vec3::sZero(); }
127
129 void SetLinearVelocity(Vec3Arg inLinearVelocity) { JPH_ASSERT(!IsStatic()); mMotionProperties->SetLinearVelocity(inLinearVelocity); }
130
132 void SetLinearVelocityClamped(Vec3Arg inLinearVelocity) { JPH_ASSERT(!IsStatic()); mMotionProperties->SetLinearVelocityClamped(inLinearVelocity); }
133
135 inline Vec3 GetAngularVelocity() const { return !IsStatic()? mMotionProperties->GetAngularVelocity() : Vec3::sZero(); }
136
138 void SetAngularVelocity(Vec3Arg inAngularVelocity) { JPH_ASSERT(!IsStatic()); mMotionProperties->SetAngularVelocity(inAngularVelocity); }
139
141 void SetAngularVelocityClamped(Vec3Arg inAngularVelocity) { JPH_ASSERT(!IsStatic()); mMotionProperties->SetAngularVelocityClamped(inAngularVelocity); }
142
144 inline Vec3 GetPointVelocityCOM(Vec3Arg inPointRelativeToCOM) const { return !IsStatic()? mMotionProperties->GetPointVelocityCOM(inPointRelativeToCOM) : Vec3::sZero(); }
145
147 inline Vec3 GetPointVelocity(RVec3Arg inPoint) const { JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::Read)); return GetPointVelocityCOM(Vec3(inPoint - mPosition)); }
148
150 inline void AddForce(Vec3Arg inForce) { JPH_ASSERT(IsDynamic()); (Vec3::sLoadFloat3Unsafe(mMotionProperties->mForce) + inForce).StoreFloat3(&mMotionProperties->mForce); }
151
153 inline void AddForce(Vec3Arg inForce, RVec3Arg inPosition);
154
156 inline void AddTorque(Vec3Arg inTorque) { JPH_ASSERT(IsDynamic()); (Vec3::sLoadFloat3Unsafe(mMotionProperties->mTorque) + inTorque).StoreFloat3(&mMotionProperties->mTorque); }
157
158 // Get the total amount of force applied to the center of mass this time step (through AddForce calls). Note that it will reset to zero after PhysicsSimulation::Update.
159 inline Vec3 GetAccumulatedForce() const { JPH_ASSERT(IsDynamic()); return mMotionProperties->GetAccumulatedForce(); }
160
161 // Get the total amount of torque applied to the center of mass this time step (through AddForce/AddTorque calls). Note that it will reset to zero after PhysicsSimulation::Update.
162 inline Vec3 GetAccumulatedTorque() const { JPH_ASSERT(IsDynamic()); return mMotionProperties->GetAccumulatedTorque(); }
163
164 // Reset the total accumulated force, not that this will be done automatically after every time step.
165 JPH_INLINE void ResetForce() { JPH_ASSERT(IsDynamic()); return mMotionProperties->ResetForce(); }
166
167 // Reset the total accumulated torque, not that this will be done automatically after every time step.
168 JPH_INLINE void ResetTorque() { JPH_ASSERT(IsDynamic()); return mMotionProperties->ResetTorque(); }
169
171 inline Mat44 GetInverseInertia() const;
172
174 inline void AddImpulse(Vec3Arg inImpulse);
175
177 inline void AddImpulse(Vec3Arg inImpulse, RVec3Arg inPosition);
178
180 inline void AddAngularImpulse(Vec3Arg inAngularImpulse);
181
183 void MoveKinematic(RVec3Arg inTargetPosition, QuatArg inTargetRotation, float inDeltaTime);
184
195 bool ApplyBuoyancyImpulse(RVec3Arg inSurfacePosition, Vec3Arg inSurfaceNormal, float inBuoyancy, float inLinearDrag, float inAngularDrag, Vec3Arg inFluidVelocity, Vec3Arg inGravity, float inDeltaTime);
196
198 inline bool IsInBroadPhase() const { return (mFlags.load(memory_order_relaxed) & uint8(EFlags::IsInBroadPhase)) != 0; }
199
201 inline bool IsCollisionCacheInvalid() const { return (mFlags.load(memory_order_relaxed) & uint8(EFlags::InvalidateContactCache)) != 0; }
202
204 inline const Shape * GetShape() const { return mShape; }
205
207 inline RVec3 GetPosition() const { JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::Read)); return mPosition - mRotation * mShape->GetCenterOfMass(); }
208
210 inline Quat GetRotation() const { JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::Read)); return mRotation; }
211
213 inline RMat44 GetWorldTransform() const;
214
216 inline RVec3 GetCenterOfMassPosition() const { JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::Read)); return mPosition; }
217
219 inline RMat44 GetCenterOfMassTransform() const;
220
222 inline RMat44 GetInverseCenterOfMassTransform() const;
223
225 inline const AABox & GetWorldSpaceBounds() const { return mBounds; }
226
228 const MotionProperties *GetMotionProperties() const { JPH_ASSERT(!IsStatic()); return mMotionProperties; }
229 MotionProperties * GetMotionProperties() { JPH_ASSERT(!IsStatic()); return mMotionProperties; }
230
232 const MotionProperties *GetMotionPropertiesUnchecked() const { return mMotionProperties; }
233 MotionProperties * GetMotionPropertiesUnchecked() { return mMotionProperties; }
234
236 uint64 GetUserData() const { return mUserData; }
237 void SetUserData(uint64 inUserData) { mUserData = inUserData; }
238
240 inline Vec3 GetWorldSpaceSurfaceNormal(const SubShapeID &inSubShapeID, RVec3Arg inPosition) const;
241
243 inline TransformedShape GetTransformedShape() const { JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::Read)); return TransformedShape(mPosition, mRotation, mShape, mID); }
244
246 BodyCreationSettings GetBodyCreationSettings() const;
247
249 SoftBodyCreationSettings GetSoftBodyCreationSettings() const;
250
253
256
259 static inline bool sFindCollidingPairsCanCollide(const Body &inBody1, const Body &inBody2);
260
262 inline void AddPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime) { JPH_ASSERT(IsRigidBody()); JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::ReadWrite)); mPosition += mMotionProperties->LockTranslation(inLinearVelocityTimesDeltaTime); JPH_ASSERT(!mPosition.IsNaN()); }
263 inline void SubPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime) { JPH_ASSERT(IsRigidBody()); JPH_ASSERT(BodyAccess::sCheckRights(BodyAccess::sPositionAccess, BodyAccess::EAccess::ReadWrite)); mPosition -= mMotionProperties->LockTranslation(inLinearVelocityTimesDeltaTime); JPH_ASSERT(!mPosition.IsNaN()); }
264
266 inline void AddRotationStep(Vec3Arg inAngularVelocityTimesDeltaTime);
267 inline void SubRotationStep(Vec3Arg inAngularVelocityTimesDeltaTime);
268
270 inline void SetInBroadPhaseInternal(bool inInBroadPhase) { if (inInBroadPhase) mFlags.fetch_or(uint8(EFlags::IsInBroadPhase), memory_order_relaxed); else mFlags.fetch_and(uint8(~uint8(EFlags::IsInBroadPhase)), memory_order_relaxed); }
271
273 inline bool InvalidateContactCacheInternal() { return (mFlags.fetch_or(uint8(EFlags::InvalidateContactCache), memory_order_relaxed) & uint8(EFlags::InvalidateContactCache)) == 0; }
274
276 inline void ValidateContactCacheInternal() { JPH_IF_ENABLE_ASSERTS(uint8 old_val = ) mFlags.fetch_and(uint8(~uint8(EFlags::InvalidateContactCache)), memory_order_relaxed); JPH_ASSERT((old_val & uint8(EFlags::InvalidateContactCache)) != 0); }
277
279 void CalculateWorldSpaceBoundsInternal();
280
282 void SetPositionAndRotationInternal(RVec3Arg inPosition, QuatArg inRotation, bool inResetSleepTestSpheres = true);
283
287 void UpdateCenterOfMassInternal(Vec3Arg inPreviousCenterOfMass, bool inUpdateMassProperties);
288
292 void SetShapeInternal(const Shape *inShape, bool inUpdateMassProperties);
293
295 uint32 GetIndexInActiveBodiesInternal() const { return mMotionProperties != nullptr? mMotionProperties->mIndexInActiveBodies : cInactiveIndex; }
296
298 ECanSleep UpdateSleepStateInternal(float inDeltaTime, float inMaxMovement, float inTimeBeforeSleep);
299
301 void SaveState(StateRecorder &inStream) const;
302
304 void RestoreState(StateRecorder &inStream);
305
307
308 static constexpr uint32 cInactiveIndex = MotionProperties::cInactiveIndex;
309
310private:
311 friend class BodyManager;
312
313 explicit Body(bool);
314
315 inline void GetSleepTestPoints(RVec3 *outPoints) const;
316 inline void ResetSleepTestSpheres();
317
318 enum class EFlags : uint8
319 {
320 IsSensor = 1 << 0,
321 SensorDetectsStatic = 1 << 1,
322 IsInBroadPhase = 1 << 2,
323 InvalidateContactCache = 1 << 3,
324 UseManifoldReduction = 1 << 4,
325 };
326
327 // 16 byte aligned
328 RVec3 mPosition;
329 Quat mRotation;
330 AABox mBounds;
331
332 // 8 byte aligned
333 RefConst<Shape> mShape;
334 MotionProperties * mMotionProperties = nullptr;
335 uint64 mUserData = 0;
336 CollisionGroup mCollisionGroup;
337
338 // 4 byte aligned
339 float mFriction;
340 float mRestitution;
341 BodyID mID;
342
343 // 2 or 4 bytes aligned
344 ObjectLayer mObjectLayer;
345
346 // 1 byte aligned
347 EBodyType mBodyType;
348 BroadPhaseLayer mBroadPhaseLayer;
349 EMotionType mMotionType;
350 atomic<uint8> mFlags = 0;
351
352 // 122 bytes up to here (64-bit mode, single precision, 16-bit ObjectLayer)
353
354#if JPH_CPU_ADDRESS_BITS == 32
355 // Padding for mShape, mMotionProperties, mCollisionGroup.mGroupFilter being 4 instead of 8 bytes in 32 bit mode
356 uint8 mPadding[12];
357#endif
358};
359
360static_assert(sizeof(Body) == JPH_IF_SINGLE_PRECISION_ELSE(128, 160), "Body size is incorrect");
361static_assert(alignof(Body) == JPH_RVECTOR_ALIGNMENT, "Body should properly align");
362
364
365#include "Body.inl"
EBodyType
Type of body.
Definition: BodyType.h:11
std::uint8_t uint8
Definition: Core.h:427
std::uint64_t uint64
Definition: Core.h:430
#define JPH_NAMESPACE_END
Definition: Core.h:354
std::uint32_t uint32
Definition: Core.h:429
#define JPH_EXPORT_GCC_BUG_WORKAROUND
Definition: Core.h:218
#define JPH_IF_SINGLE_PRECISION_ELSE(s, d)
Definition: Core.h:491
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:348
#define JPH_IF_ENABLE_ASSERTS(...)
Definition: IssueReporting.h:35
#define JPH_ASSERT(...)
Definition: IssueReporting.h:33
#define JPH_OVERRIDE_NEW_DELETE
Macro to override the new and delete functions.
Definition: Memory.h:29
ECanSleep
Enum that determines if an object can go to sleep.
Definition: MotionProperties.h:22
EMotionType
Motion type of a physics body.
Definition: MotionType.h:11
uint16 ObjectLayer
Definition: ObjectLayer.h:16
#define JPH_RVECTOR_ALIGNMENT
Definition: Real.h:34
Axis aligned box.
Definition: AABox.h:16
Settings for constructing a rigid body.
Definition: BodyCreationSettings.h:31
Definition: Body.h:35
Vec3 GetPointVelocity(RVec3Arg inPoint) const
Velocity of point inPoint (in world space, e.g. on the surface of the body) of the body (unit: m/s)
Definition: Body.h:147
bool IsInBroadPhase() const
Check if this body has been added to the physics system.
Definition: Body.h:198
const MotionProperties * GetMotionProperties() const
Access to the motion properties.
Definition: Body.h:228
RVec3 GetCenterOfMassPosition() const
Gets the world space position of this body's center of mass.
Definition: Body.h:216
EMotionType GetMotionType() const
Motion type of this body.
Definition: Body.h:99
void SetAngularVelocity(Vec3Arg inAngularVelocity)
Set world space angular velocity of the center of mass (unit: rad/s)
Definition: Body.h:138
bool SensorDetectsStatic() const
Check if this sensor detects static objects entering it.
Definition: Body.h:86
void SetCollisionGroup(const CollisionGroup &inGroup)
Definition: Body.h:111
Vec3 GetPointVelocityCOM(Vec3Arg inPointRelativeToCOM) const
Velocity of point inPoint (in center of mass space, e.g. on the surface of the body) of the body (uni...
Definition: Body.h:144
bool IsDynamic() const
Check if this body is dynamic, which means that it moves and forces can act on it.
Definition: Body.h:67
bool GetAllowSleeping() const
If this body can go to sleep. Note that disabling sleeping on a sleeping object wil not wake it up.
Definition: Body.h:114
bool IsSensor() const
Check if this body is a sensor.
Definition: Body.h:80
const AABox & GetWorldSpaceBounds() const
Get world space bounding box.
Definition: Body.h:225
void SubPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime)
Definition: Body.h:263
void SetSensorDetectsStatic(bool inDetectsStatic)
Definition: Body.h:83
void SetUserData(uint64 inUserData)
Definition: Body.h:237
bool IsSoftBody() const
Check if this body is a soft body.
Definition: Body.h:55
const Shape * GetShape() const
Get the shape of this body.
Definition: Body.h:204
bool InvalidateContactCacheInternal()
Invalidate the contact cache (should only be called by the BodyManager), will be reset the next simul...
Definition: Body.h:273
uint64 GetUserData() const
Access to the user data, can be used for anything by the application.
Definition: Body.h:236
BroadPhaseLayer GetBroadPhaseLayer() const
Get broadphase layer, this determines in which broad phase sub-tree the object is placed.
Definition: Body.h:103
float GetRestitution() const
Restitution (dimensionless number, usually between 0 and 1, 0 = completely inelastic collision respon...
Definition: Body.h:122
const CollisionGroup & GetCollisionGroup() const
Collision group and sub-group ID, determines which other objects it collides with.
Definition: Body.h:109
void SetIsSensor(bool inIsSensor)
Definition: Body.h:77
void SetLinearVelocityClamped(Vec3Arg inLinearVelocity)
Set world space linear velocity of the center of mass, will make sure the value is clamped against th...
Definition: Body.h:132
bool GetUseManifoldReductionWithBody(const Body &inBody2) const
Checks if the combination of this body and inBody2 should use manifold reduction.
Definition: Body.h:96
void SetLinearVelocity(Vec3Arg inLinearVelocity)
Set world space linear velocity of the center of mass (unit: m/s)
Definition: Body.h:129
uint32 GetIndexInActiveBodiesInternal() const
Access to the index in the BodyManager::mActiveBodies list.
Definition: Body.h:295
Vec3 GetLinearVelocity() const
Get world space linear velocity of the center of mass (unit: m/s)
Definition: Body.h:126
ObjectLayer GetObjectLayer() const
Get object layer, this determines which other objects it collides with.
Definition: Body.h:106
void SetRestitution(float inRestitution)
Definition: Body.h:123
bool IsCollisionCacheInvalid() const
Check if this body has been changed in such a way that the collision cache should be considered inval...
Definition: Body.h:201
JPH_OVERRIDE_NEW_DELETE Body()=default
Default constructor.
bool IsRigidBody() const
Check if this body is a rigid body.
Definition: Body.h:52
bool IsStatic() const
Check if this body is static (not movable)
Definition: Body.h:61
EBodyType GetBodyType() const
Get the type of body (rigid or soft)
Definition: Body.h:49
void SetUseManifoldReduction(bool inUseReduction)
Definition: Body.h:90
static Body sFixedToWorld
A dummy body that can be used by constraints to attach a constraint to the world instead of another b...
Definition: Body.h:252
void SetAngularVelocityClamped(Vec3Arg inAngularVelocity)
Set world space angular velocity of the center of mass, will make sure the value is clamped against t...
Definition: Body.h:141
JPH_INLINE void ResetForce()
Definition: Body.h:165
Vec3 GetAccumulatedTorque() const
Definition: Body.h:162
bool CanBeKinematicOrDynamic() const
Check if a body could be made kinematic or dynamic (if it was created dynamic or with mAllowDynamicOr...
Definition: Body.h:70
void SetInBroadPhaseInternal(bool inInBroadPhase)
Flag if body is in the broadphase (should only be called by the BroadPhase)
Definition: Body.h:270
MotionProperties * GetMotionProperties()
Definition: Body.h:229
Quat GetRotation() const
World space rotation of the body.
Definition: Body.h:210
TransformedShape GetTransformedShape() const
Get the transformed shape of this body, which can be used to do collision detection outside of a body...
Definition: Body.h:243
JPH_INLINE void ResetTorque()
Definition: Body.h:168
bool IsKinematic() const
Check if this body is kinematic (keyframed), which means that it will move according to its current v...
Definition: Body.h:64
const BodyID & GetID() const
Get the id of this body.
Definition: Body.h:46
float GetFriction() const
Friction (dimensionless number, usually between 0 and 1, 0 = no friction, 1 = friction force equals f...
Definition: Body.h:118
const MotionProperties * GetMotionPropertiesUnchecked() const
Access to the motion properties (version that does not check if the object is kinematic or dynamic)
Definition: Body.h:232
~Body()
Destructor.
Definition: Body.h:43
CollisionGroup & GetCollisionGroup()
Definition: Body.h:110
MotionProperties * GetMotionPropertiesUnchecked()
Definition: Body.h:233
Vec3 GetAccumulatedForce() const
Definition: Body.h:159
Vec3 GetAngularVelocity() const
Get world space angular velocity of the center of mass (unit: rad/s)
Definition: Body.h:135
RVec3 GetPosition() const
World space position of the body.
Definition: Body.h:207
void AddForce(Vec3Arg inForce)
Add force (unit: N) at center of mass for the next time step, will be reset after the next call to Ph...
Definition: Body.h:150
bool IsActive() const
If this body is currently actively simulating (true) or sleeping (false)
Definition: Body.h:58
bool GetUseManifoldReduction() const
Check if this body can use manifold reduction.
Definition: Body.h:93
void AddTorque(Vec3Arg inTorque)
Add torque (unit: N m) for the next time step, will be reset after the next call to PhysicsSimulation...
Definition: Body.h:156
void ValidateContactCacheInternal()
Reset the collision cache invalid flag (should only be called by the BodyManager).
Definition: Body.h:276
void SetFriction(float inFriction)
Definition: Body.h:119
void AddPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime)
Update position using an Euler step (used during position integrate & constraint solving)
Definition: Body.h:262
ID of a body. This is a way of reasoning about bodies in a multithreaded simulation while avoiding ra...
Definition: BodyID.h:13
Class that contains all bodies.
Definition: BodyManager.h:32
Definition: BroadPhaseLayer.h:18
Definition: CollisionGroup.h:20
Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.
Definition: Mat44.h:13
The Body class only keeps track of state for static bodies, the MotionProperties class keeps the addi...
Definition: MotionProperties.h:29
static constexpr uint32 cInactiveIndex
Constant indicating that body is not active.
Definition: MotionProperties.h:192
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition: NonCopyable.h:11
Definition: Quat.h:33
Definition: Reference.h:151
Base class for all shapes (collision volume of a body). Defines a virtual interface for collision det...
Definition: Shape.h:174
Definition: SoftBodyCreationSettings.h:18
Definition: StateRecorder.h:48
A sub shape id contains a path to an element (usually a triangle or other primitive type) of a compou...
Definition: SubShapeID.h:23
Definition: TransformedShape.h:26
Definition: Vec3.h:16
static JPH_INLINE Vec3 sZero()
Vector with all zeros.
Definition: Vec3.inl:107
static JPH_INLINE Vec3 sLoadFloat3Unsafe(const Float3 &inV)
Load 3 floats from memory (reads 32 bits extra which it doesn't use)
Definition: Vec3.inl:134