21#ifdef JPH_DEBUG_RENDERER
66 void SetPressure(
float inPressure) { mPressure = inPressure; }
76 float GetVolume()
const {
return GetVolumeTimesSix() / 6.0f; }
81#ifdef JPH_DEBUG_RENDERER
117 struct CollidingShape
120 Vec3 GetPointVelocity(
Vec3Arg inPointRelativeToCOM)
const
122 return mLinearVelocity + mAngularVelocity.
Cross(inPointRelativeToCOM);
125 Mat44 mCenterOfMassTransform;
132 bool mUpdateVelocities;
134 Vec3 mLinearVelocity;
135 Vec3 mAngularVelocity;
136 Vec3 mOriginalLinearVelocity;
137 Vec3 mOriginalAngularVelocity;
171 float GetVolumeTimesSix()
const;
177 AABox mLocalPredictedBounds;
180 bool mUpdatePosition;
@ CalculateMassAndInertia
Tells the system to calculate the mass and inertia based on density.
#define JPH_EXPORT
Definition Core.h:214
unsigned int uint
Definition Core.h:426
#define JPH_NAMESPACE_END
Definition Core.h:354
std::uint32_t uint32
Definition Core.h:429
#define JPH_NAMESPACE_BEGIN
Definition Core.h:348
EMotionType
Motion type of a physics body.
Definition MotionType.h:11
Array< RefConst< PhysicsMaterial > > PhysicsMaterialList
Definition PhysicsMaterial.h:50
std::vector< T, STLAllocator< T > > Array
Definition STLAllocator.h:81
Axis aligned box.
Definition AABox.h:16
ID of a body. This is a way of reasoning about bodies in a multithreaded simulation while avoiding ra...
Definition BodyID.h:13
Simple triangle renderer for debugging purposes.
Definition DebugRenderer.h:30
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
void RestoreState(StateRecorder &inStream)
Restoring state for replay.
Definition MotionProperties.cpp:138
void SaveState(StateRecorder &inStream) const
Saving state for replay.
Definition MotionProperties.cpp:123
Definition PhysicsSystem.h:28
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
This class contains the runtime information of a soft body.
Definition SoftBodyMotionProperties.h:30
Vertex & GetVertex(uint inIndex)
Definition SoftBodyMotionProperties.h:49
EStatus
Return code for ParallelUpdate.
Definition SoftBodyMotionProperties.h:103
Array< Vertex > & GetVertices()
Definition SoftBodyMotionProperties.h:45
const PhysicsMaterialList & GetMaterials() const
Get the materials of the soft body.
Definition SoftBodyMotionProperties.h:52
const Array< Vertex > & GetVertices() const
Get the vertices of the soft body.
Definition SoftBodyMotionProperties.h:44
void SetUpdatePosition(bool inUpdatePosition)
Definition SoftBodyMotionProperties.h:70
void SetPressure(float inPressure)
Definition SoftBodyMotionProperties.h:66
const Array< Face > & GetFaces() const
Get the faces of the soft body.
Definition SoftBodyMotionProperties.h:55
const AABox & GetLocalBounds() const
Get local bounding box.
Definition SoftBodyMotionProperties.h:73
const Vertex & GetVertex(uint inIndex) const
Access an individual vertex.
Definition SoftBodyMotionProperties.h:48
void SetNumIterations(uint32 inNumIterations)
Definition SoftBodyMotionProperties.h:62
bool GetUpdatePosition() const
Update the position of the body while simulating (set to false for something that is attached to the ...
Definition SoftBodyMotionProperties.h:69
float GetVolume() const
Get the volume of the soft body. Note can become negative if the shape is inside out!
Definition SoftBodyMotionProperties.h:76
uint32 GetNumIterations() const
Get the number of solver iterations.
Definition SoftBodyMotionProperties.h:61
float GetPressure() const
Get the pressure of the soft body.
Definition SoftBodyMotionProperties.h:65
const SoftBodySharedSettings * GetSettings() const
Get the shared settings of the soft body.
Definition SoftBodyMotionProperties.h:41
const Face & GetFace(uint inIndex) const
Access to an individual face.
Definition SoftBodyMotionProperties.h:58
Definition SoftBodySharedSettings.h:16
Temporary data used by the update of a soft body.
Definition SoftBodyUpdateContext.h:17
Definition SoftBodyVertex.h:16
Definition StateRecorder.h:48
JPH_INLINE Vec3 Cross(Vec3Arg inV2) const
Cross product.
Definition Vec3.inl:582
Definition PhysicsSettings.h:28
An edge keeps two vertices at a constant distance using a spring: |x1 - x2| = rest length.
Definition SoftBodySharedSettings.h:90
A face defines the surface of the body.
Definition SoftBodySharedSettings.h:74
Volume constraint, keeps the volume of a tetrahedron constant.
Definition SoftBodySharedSettings.h:104