Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
SoftBodyUpdateContext Class Reference

Temporary data used by the update of a soft body. More...

#include <SoftBodyUpdateContext.h>

Inheritance diagram for SoftBodyUpdateContext:
NonCopyable

Public Types

enum class  EState { DetermineCollisionPlanes , DetermineSensorCollisions , ApplyConstraints , Done }
 Describes progress in the current update. More...
 

Public Attributes

BodymBody
 Body that is being updated. More...
 
SoftBodyMotionPropertiesmMotionProperties
 Motion properties of that body. More...
 
SoftBodyContactListenermContactListener
 Contact listener to fire callbacks to. More...
 
RMat44 mCenterOfMassTransform
 Transform of the body relative to the soft body. More...
 
Vec3 mGravity
 Gravity vector in local space of the soft body. More...
 
Vec3 mDisplacementDueToGravity
 Displacement of the center of mass due to gravity in the current time step. More...
 
float mDeltaTime
 Delta time for the current time step. More...
 
float mSubStepDeltaTime
 Delta time for each sub step. More...
 
atomic< EStatemState { EState::DetermineCollisionPlanes }
 Current state of the update. More...
 
atomic< uintmNextCollisionVertex { 0 }
 Next vertex to process for DetermineCollisionPlanes. More...
 
atomic< uintmNumCollisionVerticesProcessed { 0 }
 Number of vertices processed by DetermineCollisionPlanes, used to determine if we can go to the next step. More...
 
atomic< uintmNextSensorIndex { 0 }
 Next sensor to process for DetermineCollisionPlanes. More...
 
atomic< uintmNumSensorsProcessed { 0 }
 Number of sensors processed by DetermineSensorCollisions, used to determine if we can go to the next step. More...
 
atomic< uintmNextIteration { 0 }
 Next simulation iteration to process. More...
 
atomic< uintmNextConstraintGroup { 0 }
 Next constraint group to process. More...
 
atomic< uintmNumConstraintGroupsProcessed { 0 }
 Number of groups processed, used to determine if we can go to the next iteration. More...
 
Vec3 mDeltaPosition
 Delta position of the body in the current time step, should be applied after the update. More...
 
ECanSleep mCanSleep
 Can the body sleep? Should be applied after the update. More...
 

Static Public Attributes

static constexpr uint cVertexCollisionBatch = 64
 Number of vertices to process in a batch in DetermineCollisionPlanes. More...
 
static constexpr uint cVertexConstraintBatch = 256
 Number of vertices to group for processing batches of constraints in ApplyEdgeConstraints. More...
 

Additional Inherited Members

- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 

Detailed Description

Temporary data used by the update of a soft body.

Member Enumeration Documentation

◆ EState

enum class SoftBodyUpdateContext::EState
strong

Describes progress in the current update.

Enumerator
DetermineCollisionPlanes 

Determine collision planes for vertices in parallel.

DetermineSensorCollisions 

Determine collisions with sensors in parallel.

ApplyConstraints 

Apply constraints in parallel.

Done 

Update is finished.

Member Data Documentation

◆ cVertexCollisionBatch

constexpr uint SoftBodyUpdateContext::cVertexCollisionBatch = 64
staticconstexpr

Number of vertices to process in a batch in DetermineCollisionPlanes.

◆ cVertexConstraintBatch

constexpr uint SoftBodyUpdateContext::cVertexConstraintBatch = 256
staticconstexpr

Number of vertices to group for processing batches of constraints in ApplyEdgeConstraints.

◆ mBody

Body* SoftBodyUpdateContext::mBody

Body that is being updated.

◆ mCanSleep

ECanSleep SoftBodyUpdateContext::mCanSleep

Can the body sleep? Should be applied after the update.

◆ mCenterOfMassTransform

RMat44 SoftBodyUpdateContext::mCenterOfMassTransform

Transform of the body relative to the soft body.

◆ mContactListener

SoftBodyContactListener* SoftBodyUpdateContext::mContactListener

Contact listener to fire callbacks to.

◆ mDeltaPosition

Vec3 SoftBodyUpdateContext::mDeltaPosition

Delta position of the body in the current time step, should be applied after the update.

◆ mDeltaTime

float SoftBodyUpdateContext::mDeltaTime

Delta time for the current time step.

◆ mDisplacementDueToGravity

Vec3 SoftBodyUpdateContext::mDisplacementDueToGravity

Displacement of the center of mass due to gravity in the current time step.

◆ mGravity

Vec3 SoftBodyUpdateContext::mGravity

Gravity vector in local space of the soft body.

◆ mMotionProperties

SoftBodyMotionProperties* SoftBodyUpdateContext::mMotionProperties

Motion properties of that body.

◆ mNextCollisionVertex

atomic<uint> SoftBodyUpdateContext::mNextCollisionVertex { 0 }

Next vertex to process for DetermineCollisionPlanes.

◆ mNextConstraintGroup

atomic<uint> SoftBodyUpdateContext::mNextConstraintGroup { 0 }

Next constraint group to process.

◆ mNextIteration

atomic<uint> SoftBodyUpdateContext::mNextIteration { 0 }

Next simulation iteration to process.

◆ mNextSensorIndex

atomic<uint> SoftBodyUpdateContext::mNextSensorIndex { 0 }

Next sensor to process for DetermineCollisionPlanes.

◆ mNumCollisionVerticesProcessed

atomic<uint> SoftBodyUpdateContext::mNumCollisionVerticesProcessed { 0 }

Number of vertices processed by DetermineCollisionPlanes, used to determine if we can go to the next step.

◆ mNumConstraintGroupsProcessed

atomic<uint> SoftBodyUpdateContext::mNumConstraintGroupsProcessed { 0 }

Number of groups processed, used to determine if we can go to the next iteration.

◆ mNumSensorsProcessed

atomic<uint> SoftBodyUpdateContext::mNumSensorsProcessed { 0 }

Number of sensors processed by DetermineSensorCollisions, used to determine if we can go to the next step.

◆ mState

atomic<EState> SoftBodyUpdateContext::mState { EState::DetermineCollisionPlanes }

Current state of the update.

◆ mSubStepDeltaTime

float SoftBodyUpdateContext::mSubStepDeltaTime

Delta time for each sub step.


The documentation for this class was generated from the following file: