Jolt Physics
A multi core friendly Game Physics Engine
|
Temporary data used by the update of a soft body. More...
#include <SoftBodyUpdateContext.h>
Public Types | |
enum class | EState { DetermineCollisionPlanes , ApplyEdgeConstraints , Done } |
Describes progress in the current update. More... | |
Static Public Member Functions | |
static uint64 | sGetEdgeGroupStart (uint32 inGroup) |
Construct the edge constraint iterator starting at a new group. More... | |
static void | sGetEdgeGroupAndStartIdx (uint64 inNextEdgeConstraint, uint32 &outGroup, uint32 &outStartIdx) |
Get the group and start index from the edge constraint iterator. More... | |
Public Attributes | |
Body * | mBody |
Body that is being updated. More... | |
SoftBodyMotionProperties * | mMotionProperties |
Motion properties of that body. More... | |
SoftBodyContactListener * | mContactListener |
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< EState > | mState { EState::DetermineCollisionPlanes } |
Current state of the update. More... | |
atomic< uint > | mNextCollisionVertex { 0 } |
Next vertex to process for DetermineCollisionPlanes. More... | |
atomic< uint > | mNumCollisionVerticesProcessed { 0 } |
Number of vertices processed by DetermineCollisionPlanes, used to determine if we can start simulating. More... | |
atomic< uint > | mNextIteration { 0 } |
Next simulation iteration to process. More... | |
atomic< uint64 > | mNextEdgeConstraint { 0 } |
Next edge constraint group and start index to process. More... | |
atomic< uint > | mNumEdgeConstraintsProcessed { 0 } |
Number of edge constraints processed by ApplyEdgeConstraints, used to determine if we can go to the next group / 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 | cEdgeConstraintBatch = 256 |
Number of edge constraints to process in a batch in ApplyEdgeConstraints. More... | |
Additional Inherited Members | |
Public Member Functions inherited from NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
void | operator= (const NonCopyable &)=delete |
Temporary data used by the update of a soft body.
|
strong |
|
inlinestatic |
Get the group and start index from the edge constraint iterator.
Construct the edge constraint iterator starting at a new group.
|
staticconstexpr |
Number of edge constraints to process in a batch in ApplyEdgeConstraints.
|
staticconstexpr |
Number of vertices to process in a batch in DetermineCollisionPlanes.
ECanSleep SoftBodyUpdateContext::mCanSleep |
Can the body sleep? Should be applied after the update.
RMat44 SoftBodyUpdateContext::mCenterOfMassTransform |
Transform of the body relative to the soft body.
SoftBodyContactListener* SoftBodyUpdateContext::mContactListener |
Contact listener to fire callbacks to.
Vec3 SoftBodyUpdateContext::mDeltaPosition |
Delta position of the body in the current time step, should be applied after the update.
float SoftBodyUpdateContext::mDeltaTime |
Delta time for the current time step.
Vec3 SoftBodyUpdateContext::mDisplacementDueToGravity |
Displacement of the center of mass due to gravity in the current time step.
Vec3 SoftBodyUpdateContext::mGravity |
Gravity vector in local space of the soft body.
SoftBodyMotionProperties* SoftBodyUpdateContext::mMotionProperties |
Motion properties of that body.
atomic<uint> SoftBodyUpdateContext::mNextCollisionVertex { 0 } |
Next vertex to process for DetermineCollisionPlanes.
atomic<uint64> SoftBodyUpdateContext::mNextEdgeConstraint { 0 } |
Next edge constraint group and start index to process.
atomic<uint> SoftBodyUpdateContext::mNextIteration { 0 } |
Next simulation iteration to process.
atomic<uint> SoftBodyUpdateContext::mNumCollisionVerticesProcessed { 0 } |
Number of vertices processed by DetermineCollisionPlanes, used to determine if we can start simulating.
atomic<uint> SoftBodyUpdateContext::mNumEdgeConstraintsProcessed { 0 } |
Number of edge constraints processed by ApplyEdgeConstraints, used to determine if we can go to the next group / iteration.
atomic<EState> SoftBodyUpdateContext::mState { EState::DetermineCollisionPlanes } |
Current state of the update.
float SoftBodyUpdateContext::mSubStepDeltaTime |
Delta time for each sub step.