uint32_t uint32
Definition Core.h:312
unsigned int uint
Definition Core.h:309
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
std::vector< T, STLAllocator< T > > Array
Definition STLAllocator.h:81
#define JPH_DECLARE_SERIALIZABLE_NON_VIRTUAL(class_name)
Definition SerializableObject.h:71
Settings for constructing a rigid body.
Definition BodyCreationSettings.h:29
A constraint and how it is connected to the bodies in the scene.
Definition PhysicsScene.h:42
uint32 mBody1
Index of first body (in mBodies)
Definition PhysicsScene.h:50
RefConst< TwoBodyConstraintSettings > mSettings
Constraint settings.
Definition PhysicsScene.h:49
uint32 mBody2
Index of second body (in mBodies)
Definition PhysicsScene.h:51
Contains the creation settings of a set of bodies.
Definition PhysicsScene.h:17
Array< BodyCreationSettings > & GetBodies()
Definition PhysicsScene.h:38
void FromPhysicsSystem(const PhysicsSystem *inSystem)
For debugging purposes: Construct a scene from the current state of the physics system.
Definition PhysicsScene.cpp:170
bool CreateBodies(PhysicsSystem *inSystem) const
Instantiate all bodies, returns false if not all bodies could be created.
Definition PhysicsScene.cpp:59
bool FixInvalidScales()
Definition PhysicsScene.cpp:37
size_t GetNumConstraints() const
Get number of constraints in this scene.
Definition PhysicsScene.h:55
void AddConstraint(const TwoBodyConstraintSettings *inConstraint, uint32 inBody1, uint32 inBody2)
Definition PhysicsScene.cpp:32
static PhysicsSceneResult sRestoreFromBinaryState(StreamIn &inStream)
Restore a saved scene from inStream.
Definition PhysicsScene.cpp:117
void SaveBinaryState(StreamOut &inStream, bool inSaveShapes, bool inSaveGroupFilter) const
Definition PhysicsScene.cpp:96
const Array< ConnectedConstraint > & GetConstraints() const
Access to the constraints for this scene.
Definition PhysicsScene.h:58
static constexpr uint32 cFixedToWorld
Body constant to use to indicate that the constraint is attached to the fixed world.
Definition PhysicsScene.h:25
size_t GetNumBodies() const
Get number of bodies in this scene.
Definition PhysicsScene.h:34
Array< ConnectedConstraint > & GetConstraints()
Definition PhysicsScene.h:59
void AddBody(const BodyCreationSettings &inBody)
Add a body to the scene.
Definition PhysicsScene.cpp:27
const Array< BodyCreationSettings > & GetBodies() const
Access to the body settings for this scene.
Definition PhysicsScene.h:37
Definition PhysicsSystem.h:28
Definition Reference.h:154
Definition Reference.h:35
Helper class that either contains a valid result or an error.
Definition Result.h:15
Simple binary input stream.
Definition StreamIn.h:11
Simple binary output stream.
Definition StreamOut.h:11
Base class for settings for all constraints that involve 2 bodies.
Definition TwoBodyConstraint.h:16