|
void | Initialize (const SoftBodyCreationSettings &inSettings) |
| Initialize the soft body motion properties. More...
|
|
const SoftBodySharedSettings * | GetSettings () const |
| Get the shared settings of the soft body. More...
|
|
const Array< Vertex > & | GetVertices () const |
| Get the vertices of the soft body. More...
|
|
Array< Vertex > & | GetVertices () |
|
const Vertex & | GetVertex (uint inIndex) const |
| Access an individual vertex. More...
|
|
Vertex & | GetVertex (uint inIndex) |
|
const PhysicsMaterialList & | GetMaterials () const |
| Get the materials of the soft body. More...
|
|
const Array< Face > & | GetFaces () const |
| Get the faces of the soft body. More...
|
|
const Face & | GetFace (uint inIndex) const |
| Access to an individual face. More...
|
|
uint32 | GetNumIterations () const |
| Get the number of solver iterations. More...
|
|
void | SetNumIterations (uint32 inNumIterations) |
|
float | GetPressure () const |
| Get the pressure of the soft body. More...
|
|
void | SetPressure (float inPressure) |
|
bool | GetUpdatePosition () const |
| Update the position of the body while simulating (set to false for something that is attached to the static world) More...
|
|
void | SetUpdatePosition (bool inUpdatePosition) |
|
bool | GetEnableSkinConstraints () const |
| Global setting to turn on/off skin constraints. More...
|
|
void | SetEnableSkinConstraints (bool inEnableSkinConstraints) |
|
float | GetSkinnedMaxDistanceMultiplier () const |
| Multiplier applied to Skinned::mMaxDistance to allow tightening or loosening of the skin constraints. 0 to hard skin all vertices. More...
|
|
void | SetSkinnedMaxDistanceMultiplier (float inSkinnedMaxDistanceMultiplier) |
|
const AABox & | GetLocalBounds () const |
| Get local bounding box. More...
|
|
float | GetVolume () const |
| Get the volume of the soft body. Note can become negative if the shape is inside out! More...
|
|
void | CalculateMassAndInertia () |
| Calculate the total mass and inertia of this body based on the current state of the vertices. More...
|
|
void | DrawVertices (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform) const |
| Draw the state of a soft body. More...
|
|
void | DrawVertexVelocities (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform) const |
|
void | DrawEdgeConstraints (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const |
|
void | DrawBendConstraints (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const |
|
void | DrawVolumeConstraints (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const |
|
void | DrawSkinConstraints (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const |
|
void | DrawLRAConstraints (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, ESoftBodyConstraintColor inConstraintColor) const |
|
void | DrawPredictedBounds (DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform) const |
|
void | SaveState (StateRecorder &inStream) const |
| Saving state for replay. More...
|
|
void | RestoreState (StateRecorder &inStream) |
| Restoring state for replay. More...
|
|
void | SkinVertices (RMat44Arg inCenterOfMassTransform, const Mat44 *inJointMatrices, uint inNumJoints, bool inHardSkinAll, TempAllocator &ioTempAllocator) |
|
void | CustomUpdate (float inDeltaTime, Body &ioSoftBody, PhysicsSystem &inSystem) |
|
void | InitializeUpdateContext (float inDeltaTime, Body &inSoftBody, const PhysicsSystem &inSystem, SoftBodyUpdateContext &ioContext) |
| Initialize the update context. Not part of the public API. More...
|
|
void | DetermineCollidingShapes (const SoftBodyUpdateContext &inContext, const PhysicsSystem &inSystem, const BodyLockInterface &inBodyLockInterface) |
| Do a broad phase check and collect all bodies that can possibly collide with this soft body. Not part of the public API. More...
|
|
EStatus | ParallelUpdate (SoftBodyUpdateContext &ioContext, const PhysicsSettings &inPhysicsSettings) |
| Update the soft body, will process a batch of work. Not part of the public API. More...
|
|
void | UpdateRigidBodyVelocities (const SoftBodyUpdateContext &inContext, BodyInterface &inBodyInterface) |
| Update the velocities of all rigid bodies that we collided with. Not part of the public API. More...
|
|
JPH_OVERRIDE_NEW_DELETE EMotionQuality | GetMotionQuality () const |
| Motion quality, or how well it detects collisions when it has a high velocity. More...
|
|
EAllowedDOFs | GetAllowedDOFs () const |
| Get the allowed degrees of freedom that this body has (this can be changed by calling SetMassProperties) More...
|
|
bool | GetAllowSleeping () const |
| If this body can go to sleep. More...
|
|
Vec3 | GetLinearVelocity () const |
| Get world space linear velocity of the center of mass. More...
|
|
void | SetLinearVelocity (Vec3Arg inLinearVelocity) |
| Set world space linear velocity of the center of mass. More...
|
|
void | SetLinearVelocityClamped (Vec3Arg inLinearVelocity) |
| Set world space linear velocity of the center of mass, will make sure the value is clamped against the maximum linear velocity. More...
|
|
Vec3 | GetAngularVelocity () const |
| Get world space angular velocity of the center of mass. More...
|
|
void | SetAngularVelocity (Vec3Arg inAngularVelocity) |
| Set world space angular velocity of the center of mass. More...
|
|
void | SetAngularVelocityClamped (Vec3Arg inAngularVelocity) |
| Set world space angular velocity of the center of mass, will make sure the value is clamped against the maximum angular velocity. More...
|
|
void | MoveKinematic (Vec3Arg inDeltaPosition, QuatArg inDeltaRotation, float inDeltaTime) |
| Set velocity of body such that it will be rotate/translate by inDeltaPosition/Rotation in inDeltaTime seconds. More...
|
|
void | ClampLinearVelocity () |
| Clamp velocity according to limit. More...
|
|
void | ClampAngularVelocity () |
|
float | GetLinearDamping () const |
| Get linear damping: dv/dt = -c * v. c must be between 0 and 1 but is usually close to 0. More...
|
|
void | SetLinearDamping (float inLinearDamping) |
|
float | GetAngularDamping () const |
| Get angular damping: dw/dt = -c * w. c must be between 0 and 1 but is usually close to 0. More...
|
|
void | SetAngularDamping (float inAngularDamping) |
|
float | GetGravityFactor () const |
| Get gravity factor (1 = normal gravity, 0 = no gravity) More...
|
|
void | SetGravityFactor (float inGravityFactor) |
|
void | SetMassProperties (EAllowedDOFs inAllowedDOFs, const MassProperties &inMassProperties) |
| Set the mass and inertia tensor. More...
|
|
float | GetInverseMass () const |
| Get inverse mass (1 / mass). Should only be called on a dynamic object (static or kinematic bodies have infinite mass so should be treated as 1 / mass = 0) More...
|
|
float | GetInverseMassUnchecked () const |
|
void | SetInverseMass (float inInverseMass) |
|
Vec3 | GetInverseInertiaDiagonal () const |
| Diagonal of inverse inertia matrix: D. Should only be called on a dynamic object (static or kinematic bodies have infinite mass so should be treated as D = 0) More...
|
|
Quat | GetInertiaRotation () const |
| Rotation (R) that takes inverse inertia diagonal to local space: \(I_{body}^{-1} = R \: D \: R^{-1}\). More...
|
|
void | SetInverseInertia (Vec3Arg inDiagonal, QuatArg inRot) |
|
Mat44 | GetLocalSpaceInverseInertia () const |
| Get inverse inertia matrix ( \(I_{body}^{-1}\)). Will be a matrix of zeros for a static or kinematic object. More...
|
|
Mat44 | GetLocalSpaceInverseInertiaUnchecked () const |
| Same as GetLocalSpaceInverseInertia() but doesn't check if the body is dynamic. More...
|
|
Mat44 | GetInverseInertiaForRotation (Mat44Arg inRotation) const |
| Get inverse inertia matrix ( \(I^{-1}\)) for a given object rotation (translation will be ignored). Zero if object is static or kinematic. More...
|
|
JPH_INLINE Vec3 | MultiplyWorldSpaceInverseInertiaByVector (QuatArg inBodyRotation, Vec3Arg inV) const |
| Multiply a vector with the inverse world space inertia tensor ( \(I_{world}^{-1}\)). Zero if object is static or kinematic. More...
|
|
JPH_INLINE 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 (unit: m/s) More...
|
|
JPH_INLINE Vec3 | GetAccumulatedForce () const |
|
JPH_INLINE Vec3 | GetAccumulatedTorque () const |
|
JPH_INLINE void | ResetForce () |
|
JPH_INLINE void | ResetTorque () |
|
JPH_INLINE void | ResetMotion () |
|
JPH_INLINE UVec4 | GetLinearDOFsMask () const |
| Returns a vector where the linear components that are not allowed by mAllowedDOFs are set to 0 and the rest to 0xffffffff. More...
|
|
JPH_INLINE Vec3 | LockTranslation (Vec3Arg inV) const |
| Takes a translation vector inV and returns a vector where the components that are not allowed by mAllowedDOFs are set to 0. More...
|
|
JPH_INLINE UVec4 | GetAngularDOFsMask () const |
| Returns a vector where the angular components that are not allowed by mAllowedDOFs are set to 0 and the rest to 0xffffffff. More...
|
|
JPH_INLINE Vec3 | LockAngular (Vec3Arg inV) const |
| Takes an angular velocity / torque vector inV and returns a vector where the components that are not allowed by mAllowedDOFs are set to 0. More...
|
|
void | SetNumVelocityStepsOverride (uint inN) |
| Used only when this body is dynamic and colliding. Override for the number of solver velocity iterations to run, 0 means use the default in PhysicsSettings::mNumVelocitySteps. The number of iterations to use is the max of all contacts and constraints in the island. More...
|
|
uint | GetNumVelocityStepsOverride () const |
|
void | SetNumPositionStepsOverride (uint inN) |
| Used only when this body is dynamic and colliding. Override for the number of solver position iterations to run, 0 means use the default in PhysicsSettings::mNumPositionSteps. The number of iterations to use is the max of all contacts and constraints in the island. More...
|
|
uint | GetNumPositionStepsOverride () const |
|
void | ApplyGyroscopicForceInternal (QuatArg inBodyRotation, float inDeltaTime) |
| Apply the gyroscopic force (aka Dzhanibekov effect, see https://en.wikipedia.org/wiki/Tennis_racket_theorem) More...
|
|
void | ApplyForceTorqueAndDragInternal (QuatArg inBodyRotation, Vec3Arg inGravity, float inDeltaTime) |
| Apply all accumulated forces, torques and drag (should only be called by the PhysicsSystem) More...
|
|
uint32 | GetIslandIndexInternal () const |
| Access to the island index. More...
|
|
void | SetIslandIndexInternal (uint32 inIndex) |
|
uint32 | GetIndexInActiveBodiesInternal () const |
| Access to the index in the active bodies array. More...
|
|
void | ResetSleepTestSpheres (const RVec3 *inPoints) |
| Reset spheres to center around inPoints with radius 0. More...
|
|
void | ResetSleepTestTimer () |
| Reset the sleep test timer without resetting the sleep test spheres. More...
|
|
ECanSleep | AccumulateSleepTime (float inDeltaTime, float inTimeBeforeSleep) |
| Accumulate sleep time and return if a body can go to sleep. More...
|
|
void | SaveState (StateRecorder &inStream) const |
| Saving state for replay. More...
|
|
void | RestoreState (StateRecorder &inStream) |
| Restoring state for replay. More...
|
|
float | GetMaxLinearVelocity () const |
| Maximum linear velocity that a body can achieve. Used to prevent the system from exploding. More...
|
|
void | SetMaxLinearVelocity (float inLinearVelocity) |
|
float | GetMaxAngularVelocity () const |
| Maximum angular velocity that a body can achieve. Used to prevent the system from exploding. More...
|
|
void | SetMaxAngularVelocity (float inAngularVelocity) |
|
void | AddLinearVelocityStep (Vec3Arg inLinearVelocityChange) |
|
void | SubLinearVelocityStep (Vec3Arg inLinearVelocityChange) |
|
void | AddAngularVelocityStep (Vec3Arg inAngularVelocityChange) |
|
void | SubAngularVelocityStep (Vec3Arg inAngularVelocityChange) |
|
This class contains the runtime information of a soft body.