RavEngine
Loading...
Searching...
No Matches
physx::NpSoftBody Class Reference
Inheritance diagram for physx::NpSoftBody:
[legend]
Collaboration diagram for physx::NpSoftBody:
[legend]

Public Member Functions

 NpSoftBody (PxCudaContextManager &cudaContextManager)
 
 NpSoftBody (PxBaseFlags baseFlags, PxCudaContextManager &cudaContextManager)
 
void exportData (PxSerializationContext &) const
 
virtual PxActorType::Enum getType () const
 Retrieves the type of actor.
 
virtual PxBounds3 getWorldBounds (float inflation=1.01f) const
 Retrieves the axis aligned bounding box enclosing the soft body.
 
virtual PxU32 getGpuSoftBodyIndex ()
 Returns the GPU soft body index.
 
virtual void setSoftBodyFlag (PxSoftBodyFlag::Enum flag, bool val)
 Set a single softbody flag.
 
virtual void setSoftBodyFlags (PxSoftBodyFlags flags)
 Set the softbody flags.
 
virtual PxSoftBodyFlags getSoftBodyFlag () const
 Get the softbody flags.
 
virtual void setParameter (const PxFEMParameters paramters)
 Set parameter for FEM internal solve.
 
virtual PxFEMParameters getParameter () const
 Get parameter for FEM internal solve.
 
virtual void readData (PxSoftBodyData::Enum flags, PxBuffer &buffer, bool flush)
 Issues a read command to the PxSoftBody.
 
virtual void readData (PxSoftBodyData::Enum flags, bool flush)
 Issues a read command to the PxSoftBody.
 
virtual void writeData (PxSoftBodyData::Enum flags, PxBuffer &buffer, bool flush)
 Issues a write command to the PxSoftBody.
 
virtual void writeData (PxSoftBodyData::Enum flags, bool flush)
 Issues a write command to the PxSoftBody.
 
virtual PxCudaContextManager * getCudaContextManager () const
 Return the cuda context manager.
 
virtual void setWakeCounter (PxReal wakeCounterValue)
 Sets the wake counter for the soft body.
 
virtual PxReal getWakeCounter () const
 Returns the wake counter of the soft body.
 
virtual bool isSleeping () const
 Returns true if this soft body is sleeping.
 
virtual void setSolverIterationCounts (PxU32 minPositionIters, PxU32 minVelocityIters)
 Sets the solver iteration counts for the body.
 
virtual void getSolverIterationCounts (PxU32 &minPositionIters, PxU32 &minVelocityIters) const
 Retrieves the solver iteration counts.
 
virtual PxShape * getShape ()
 Retrieves the shape pointer belonging to the actor.
 
virtual PxTetrahedronMesh * getCollisionMesh ()
 Retrieve the collision mesh pointer.
 
virtual PxTetrahedronMesh * getSimulationMesh ()
 Retrieves the simulation mesh pointer.
 
virtual PxSoftBodyAuxData * getSoftBodyAuxData ()
 Retrieves the simulation state pointer.
 
virtual bool attachShape (PxShape &shape)
 Attaches a shape.
 
virtual bool attachSimulationMesh (PxTetrahedronMesh &simulationMesh, PxSoftBodyAuxData &softBodyAuxData)
 Attaches a simulation mesh.
 
virtual void detachShape ()
 Detaches the shape.
 
virtual void detachSimulationMesh ()
 Detaches the simulation mesh.
 
virtual void release ()
 Releases the softbody.
 
PX_FORCE_INLINE const Sc::SoftBodyCore & getCore () const
 
PX_FORCE_INLINE Sc::SoftBodyCore & getCore ()
 
virtual void addParticleFilter (PxPBDParticleSystem *particlesystem, const PxParticleBuffer *buffer, PxU32 particleId, PxU32 tetId)
 Creates a collision filter between a particle and a tetrahedron in the soft body's collision mesh.
 
virtual void removeParticleFilter (PxPBDParticleSystem *particlesystem, const PxParticleBuffer *buffer, PxU32 particleId, PxU32 tetId)
 Removes a collision filter between a particle and a tetrahedron in the soft body's collision mesh.
 
virtual PxU32 addParticleAttachment (PxPBDParticleSystem *particlesystem, const PxParticleBuffer *buffer, PxU32 particleId, PxU32 tetId, const PxVec4 &barycentric)
 Creates an attachment between a particle and a soft body. Be aware that destroying the particle system before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the particle system does not.
 
virtual void removeParticleAttachment (PxPBDParticleSystem *particlesystem, PxU32 handle)
 Removes an attachment between a particle and a soft body. Be aware that destroying the particle system before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the particle system does not.
 
virtual void addRigidFilter (PxRigidActor *actor, PxU32 vertId)
 Creates a collision filter between a vertex in a soft body and a rigid body.
 
virtual void removeRigidFilter (PxRigidActor *actor, PxU32 vertId)
 Removes a collision filter between a vertex in a soft body and a rigid body.
 
virtual PxU32 addRigidAttachment (PxRigidActor *actor, PxU32 vertId, const PxVec3 &actorSpacePose, PxConeLimitedConstraint *constraint)
 Creates a rigid attachment between a soft body and a rigid body. Be aware that destroying the rigid body before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the rigid body does not.
 
virtual void removeRigidAttachment (PxRigidActor *actor, PxU32 handle)
 Releases a rigid attachment between a soft body and a rigid body. Be aware that destroying the rigid body before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the rigid body does not.
 
virtual void addTetRigidFilter (PxRigidActor *actor, PxU32 tetIdx)
 Creates collision filter between a tetrahedron in a soft body and a rigid body.
 
virtual void removeTetRigidFilter (PxRigidActor *actor, PxU32 tetIdx)
 Removes collision filter between a tetrahedron in a soft body and a rigid body.
 
virtual PxU32 addTetRigidAttachment (PxRigidActor *actor, PxU32 tetIdx, const PxVec4 &barycentric, const PxVec3 &actorSpacePose, PxConeLimitedConstraint *constraint)
 Creates a rigid attachment between a soft body and a rigid body. Be aware that destroying the rigid body before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the rigid body does not.
 
virtual void addSoftBodyFilter (PxSoftBody *softbody0, PxU32 tetIdx0, PxU32 tetIdx1)
 Creates collision filter between a tetrahedron in a soft body and a tetrahedron in another soft body.
 
virtual void removeSoftBodyFilter (PxSoftBody *softbody0, PxU32 tetIdx0, PxU32 tetIdx1)
 Removes collision filter between a tetrahedron in a soft body and a tetrahedron in other soft body.
 
virtual void addSoftBodyFilters (PxSoftBody *softbody0, PxU32 *tetIndices0, PxU32 *tetIndices1, PxU32 tetIndicesSize)
 Creates collision filters between a tetrahedron in a soft body with another soft body.
 
virtual void removeSoftBodyFilters (PxSoftBody *softbody0, PxU32 *tetIndices0, PxU32 *tetIndices1, PxU32 tetIndicesSize)
 Removes collision filters between a tetrahedron in a soft body with another soft body.
 
virtual PxU32 addSoftBodyAttachment (PxSoftBody *softbody0, PxU32 tetIdx0, const PxVec4 &tetBarycentric0, PxU32 tetIdx1, const PxVec4 &tetBarycentric1, PxConeLimitedConstraint *constraint)
 Creates an attachment between two soft bodies.
 
virtual void removeSoftBodyAttachment (PxSoftBody *softbody0, PxU32 handle)
 Releases an attachment between a soft body and the other soft body. Be aware that destroying the soft body before destroying the attachment is illegal and may cause a crash.
 
virtual void addClothFilter (PxFEMCloth *cloth, PxU32 triIdx, PxU32 tetIdx)
 Creates collision filter between a tetrahedron in a soft body and a triangle in a cloth.
 
virtual void removeClothFilter (PxFEMCloth *cloth, PxU32 triIdx, PxU32 tetIdx)
 Removes collision filter between a tetrahedron in a soft body and a triangle in a cloth.
 
virtual PxU32 addClothAttachment (PxFEMCloth *cloth, PxU32 triIdx, const PxVec4 &triBarycentric, PxU32 tetIdx, const PxVec4 &tetBarycentric, PxConeLimitedConstraint *constraint)
 Creates an attachment between a soft body and a cloth. Be aware that destroying the rigid body before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the cloth does not.
 
virtual void removeClothAttachment (PxFEMCloth *cloth, PxU32 handle)
 Releases an attachment between a cloth and a soft body. Be aware that destroying the cloth before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the cloth does not.
 
void setName (const char *)
 Sets a name string for the object that can be retrieved with getName().
 
const char * getName () const
 Retrieves the name string set with setName().
 
virtual PxBuffer * getSimPositionInvMassCPU ()
 Access to the vertices of the simulation mesh on the host.
 
virtual PxBuffer * getSimVelocityInvMassCPU ()
 Access to the velocities of the simulation mesh on the host.
 
virtual PxBuffer * getKinematicTargetCPU ()
 Access to the vertices of the simulation mesh on the host.
 
virtual PxBuffer * getPositionInvMassCPU ()
 Access to the vertices of the collision mesh on the host.
 
virtual PxBuffer * getRestPositionInvMassCPU ()
 Access to the rest vertices of the collision mesh on the host.
 
void updateMaterials ()
 
- Public Member Functions inherited from physx::NpActorTemplate< PxSoftBody >
 NpActorTemplate (PxBaseFlags baseFlags)
 
 NpActorTemplate (PxType concreteType, PxBaseFlags baseFlags, NpType::Enum type)
 
virtual void exportExtraData (PxSerializationContext &context)
 
virtual void importExtraData (PxDeserializationContext &context)
 
virtual void resolveReferences (PxDeserializationContext &context)
 
virtual PxScene * getScene () const PX_OVERRIDE
 
virtual void setActorFlag (PxActorFlag::Enum flag, bool value) PX_OVERRIDE
 
virtual void setActorFlags (PxActorFlags inFlags) PX_OVERRIDE
 
virtual PxActorFlags getActorFlags () const PX_OVERRIDE
 
virtual void setDominanceGroup (PxDominanceGroup dominanceGroup) PX_OVERRIDE
 
virtual PxDominanceGroup getDominanceGroup () const PX_OVERRIDE
 
virtual void setOwnerClient (PxClientID inClient) PX_OVERRIDE
 
virtual PxClientID getOwnerClient () const PX_OVERRIDE
 
virtual PxAggregate * getAggregate () const PX_OVERRIDE
 
- Public Member Functions inherited from physx::PxSoftBody
virtual const char * getConcreteTypeName () const PX_OVERRIDE
 Returns string name of dynamic type.
 
- Public Member Functions inherited from physx::PxBase
template<class T >
T * is ()
 
template<class T >
const T * is () const
 
PX_FORCE_INLINE PxType getConcreteType () const
 Returns concrete type of object.
 
PX_FORCE_INLINE void setBaseFlag (PxBaseFlag::Enum flag, bool value)
 Set PxBaseFlag

 
PX_FORCE_INLINE void setBaseFlags (PxBaseFlags inFlags)
 Set PxBaseFlags

 
PX_FORCE_INLINE PxBaseFlags getBaseFlags () const
 Returns PxBaseFlags.
 
virtual bool isReleasable () const
 Whether the object is subordinate.
 
- Public Member Functions inherited from physx::NpActor
 NpActor (const PxEMPTY)
 
void exportExtraData (PxSerializationContext &stream)
 
void importExtraData (PxDeserializationContext &context)
 
void resolveReferences (PxDeserializationContext &context)
 
 NpActor (NpType::Enum type)
 
void removeConstraints (PxRigidActor &owner)
 
void removeFromAggregate (PxActor &owner)
 
NpAggregate * getNpAggregate (PxU32 &index) const
 
void setAggregate (NpAggregate *np, PxActor &owner)
 
PxAggregate * getAggregate () const
 
void scSetDominanceGroup (PxDominanceGroup v)
 
void scSetOwnerClient (PxClientID inId)
 
void removeConstraintsFromScene ()
 
PX_FORCE_INLINE void addConstraintsToScene ()
 
PxU32 findConnector (NpConnectorType::Enum type, PxBase *object) const
 
void addConnector (NpConnectorType::Enum type, PxBase *object, const char *errMsg)
 
void removeConnector (PxActor &owner, NpConnectorType::Enum type, PxBase *object, const char *errorMsg)
 
PxU32 getNbConnectors (NpConnectorType::Enum type) const
 
const PxActor * getPxActor () const
 
PX_FORCE_INLINE NpConnectorIterator getConnectorIterator (NpConnectorType::Enum type)
 
template<typename T >
PxU32 getConnectors (NpConnectorType::Enum type, T **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const
 
PX_INLINE PxActorFlags getActorFlags () const
 
PX_INLINE PxDominanceGroup getDominanceGroup () const
 
PX_INLINE PxClientID getOwnerClient () const
 
PX_INLINE void scSetActorFlags (PxActorFlags v)
 
PX_FORCE_INLINE const Sc::ActorCore & getActorCore () const
 
PX_FORCE_INLINE Sc::ActorCore & getActorCore ()
 
PX_INLINE const Sc::RigidCore & getScRigidCore () const
 
PX_INLINE Sc::RigidCore & getScRigidCore ()
 
PX_FORCE_INLINE void scSwitchToNoSim ()
 
PX_FORCE_INLINE void scSwitchFromNoSim ()
 
- Public Member Functions inherited from physx::NpBase
 NpBase (const PxEMPTY)
 
 NpBase (NpType::Enum type)
 
PX_INLINE bool isAPIWriteForbidden () const
 
PX_INLINE bool isAPIWriteForbiddenExceptSplitSim () const
 
PX_FORCE_INLINE NpType::Enum getNpType () const
 
PX_FORCE_INLINE void setNpScene (NpScene *scene)
 
PX_FORCE_INLINE NpScene * getNpScene () const
 
PX_FORCE_INLINE PxU32 getBaseIndex () const
 
PX_FORCE_INLINE void setBaseIndex (PxU32 index)
 
- Public Member Functions inherited from physx::PxUserAllocated
PX_INLINE void * operator new (size_t, void *address)
 
PX_INLINE void operator delete (void *, void *)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void * operator new[] (size_t size, size_t, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete (void *ptr, Alloc alloc, const char *fileName, int line)
 
template<typename Alloc >
PX_INLINE void operator delete[] (void *ptr, Alloc alloc, const char *fileName, int line)
 
PX_INLINE void operator delete (void *ptr)
 
PX_INLINE void operator delete[] (void *ptr)
 

Static Public Member Functions

static PX_FORCE_INLINE size_t getCoreOffset ()
 
- Static Public Member Functions inherited from physx::NpActor
static void getBinaryMetaData (PxOutputStream &stream)
 
static NpShapeManager * getShapeManager_ (PxRigidActor &actor)
 
static const NpShapeManager * getShapeManager_ (const PxRigidActor &actor)
 
static NpActor & getFromPxActor (PxActor &actor)
 
static const NpActor & getFromPxActor (const PxActor &actor)
 
static NpScene * getNpSceneFromActor (const PxActor &actor)
 
static void onActorRelease (PxActor *actor)
 
- Static Public Member Functions inherited from physx::NpBase
static void getBinaryMetaData (PxOutputStream &stream)
 

Additional Inherited Members

- Public Attributes inherited from physx::PxActor
void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object.
 
- Static Public Attributes inherited from physx::NpActor
static const Offsets sOffsets
 
static const NpOffsets sNpOffsets
 
- Protected Member Functions inherited from physx::NpActorTemplate< PxSoftBody >
PX_FORCE_INLINE void setActorFlagInternal (PxActorFlag::Enum flag, bool value)
 
PX_FORCE_INLINE void setActorFlagsInternal (PxActorFlags inFlags)
 
- Protected Member Functions inherited from physx::PxSoftBody
PX_INLINE PxSoftBody (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxSoftBody (PxBaseFlags baseFlags)
 
virtual bool isKindOf (const char *name) const PX_OVERRIDE
 Returns whether a given type name matches with the type of this instance.
 
- Protected Member Functions inherited from physx::PxActor
PX_INLINE PxActor (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxActor (PxBaseFlags baseFlags)
 
- Protected Member Functions inherited from physx::PxBase
PX_INLINE PxBase (PxType concreteType, PxBaseFlags baseFlags)
 Constructor setting concrete type and base flags.
 
PX_INLINE PxBase (PxBaseFlags baseFlags)
 Deserialization constructor setting base flags.
 
virtual ~PxBase ()
 Destructor.
 
template<class T >
bool typeMatch () const
 
- Protected Attributes inherited from physx::PxBase
PxType mConcreteType
 
PxBaseFlags mBaseFlags
 
PxU32 mBuiltInRefCount
 
- Protected Attributes inherited from physx::NpActor
const char * mName
 
NpConnectorArray * mConnectorArray
 
- Protected Attributes inherited from physx::NpBase
PxU32 mFreeSlot
 

Member Function Documentation

◆ addClothAttachment()

virtual PxU32 physx::NpSoftBody::addClothAttachment ( PxFEMCloth *  cloth,
PxU32  triIdx,
const PxVec4 &  triBarycentric,
PxU32  tetIdx,
const PxVec4 &  tetBarycentric,
PxConeLimitedConstraint *  constraint 
)
virtual

Creates an attachment between a soft body and a cloth. Be aware that destroying the rigid body before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the cloth does not.

This method attaches a point inside a tetrahedron of the collision mesh to a cloth.

Warning
Feature under development, only for internal usage.
Parameters
[in]clothThe cloth actor used for the attachment
[in]triIdxThe index of a triangle in the cloth mesh that contains the point to be attached to the soft body
[in]triBarycentricThe barycentric coordinates of the attachment point inside the triangle specified by triangleIdx
[in]tetIdxThe index of a tetrahedron in the softbody's collision mesh that contains the point to be attached to the cloth
[in]tetBarycentricThe barycentric coordinates of the attachment point inside the tetrahedron specified by tetIdx
[in]constraintThe user defined cone distance limit constraint to limit the movement between a triangle in the fem cloth and a tet in the soft body.
Returns
Returns a handle that identifies the attachment created. This handle can be used to release the attachment later

Implements physx::PxSoftBody.

◆ addClothFilter()

virtual void physx::NpSoftBody::addClothFilter ( PxFEMCloth *  cloth,
PxU32  triIdx,
PxU32  tetIdx 
)
virtual

Creates collision filter between a tetrahedron in a soft body and a triangle in a cloth.

Warning
Feature under development, only for internal usage.
Parameters
[in]clothThe cloth actor used for collision filter
[in]triIdxThe index of the triangle in the cloth mesh to be filtered.
[in]tetIdxThe index of the tetrahedron in the softbody's collision mesh to be filtered.

Implements physx::PxSoftBody.

◆ addParticleAttachment()

virtual PxU32 physx::NpSoftBody::addParticleAttachment ( PxPBDParticleSystem *  particlesystem,
const PxParticleBuffer *  buffer,
PxU32  particleId,
PxU32  tetId,
const PxVec4 &  barycentric 
)
virtual

Creates an attachment between a particle and a soft body. Be aware that destroying the particle system before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the particle system does not.

Parameters
[in]particlesystemThe particle system used for the attachment
[in]bufferThe PxParticleBuffer to which the particle belongs to.
[in]particleIdThe particle that is attached to a tetrahedron in the soft body's collision mesh.
[in]tetIdThe tetrahedron in the soft body's collision mesh to attach the particle to.
[in]barycentricThe barycentric coordinates of the particle attachment position with respect to the tetrahedron specified with tetId.
Returns
Returns a handle that identifies the attachment created. This handle can be used to release the attachment later

Implements physx::PxSoftBody.

◆ addParticleFilter()

virtual void physx::NpSoftBody::addParticleFilter ( PxPBDParticleSystem *  particlesystem,
const PxParticleBuffer *  buffer,
PxU32  particleId,
PxU32  tetId 
)
virtual

Creates a collision filter between a particle and a tetrahedron in the soft body's collision mesh.

Parameters
[in]particlesystemThe particle system used for the collision filter
[in]bufferThe PxParticleBuffer to which the particle belongs to.
[in]particleIdThe particle whose collisions with the tetrahedron in the soft body are filtered.
[in]tetIdThe tetradedron in the soft body that is filtered. If tetId is PX_MAX_TETID, this particle will filter against all tetrahedra in this soft body

Implements physx::PxSoftBody.

◆ addRigidAttachment()

virtual PxU32 physx::NpSoftBody::addRigidAttachment ( PxRigidActor *  actor,
PxU32  vertId,
const PxVec3 &  actorSpacePose,
PxConeLimitedConstraint *  constraint 
)
virtual

Creates a rigid attachment between a soft body and a rigid body. Be aware that destroying the rigid body before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the rigid body does not.

This method attaches a vertex on the soft body collision mesh to the rigid body.

Parameters
[in]actorThe rigid body actor used for the attachment
[in]vertIdThe index of a vertex in the softbody's collision mesh that gets attached to the rigid body.
[in]actorSpacePoseThe location of the attachment point expressed in the rigid body's coordinate system.
[in]constraintThe user defined cone distance limit constraint to limit the movement between a vertex in the soft body and rigid body.
Returns
Returns a handle that identifies the attachment created. This handle can be used to relese the attachment later

Implements physx::PxSoftBody.

◆ addRigidFilter()

virtual void physx::NpSoftBody::addRigidFilter ( PxRigidActor *  actor,
PxU32  vertId 
)
virtual

Creates a collision filter between a vertex in a soft body and a rigid body.

Parameters
[in]actorThe rigid body actor used for the collision filter
[in]vertIdThe index of a vertex in the softbody's collision mesh whose collisions with the rigid body are filtered.

Implements physx::PxSoftBody.

◆ addSoftBodyAttachment()

virtual PxU32 physx::NpSoftBody::addSoftBodyAttachment ( PxSoftBody *  softbody0,
PxU32  tetIdx0,
const PxVec4 &  tetBarycentric0,
PxU32  tetIdx1,
const PxVec4 &  tetBarycentric1,
PxConeLimitedConstraint *  constraint 
)
virtual

Creates an attachment between two soft bodies.

This method attaches a point inside a tetrahedron of the collision mesh to a point in another soft body's tetrahedron collision mesh.

Parameters
[in]softbody0The soft body actor used for the attachment
[in]tetIdx0The index of a tetrahedron in the other soft body that contains the point to be attached to the soft body
[in]tetBarycentric0The barycentric coordinates of the attachment point inside the tetrahedron specified by tetIdx0
[in]tetIdx1The index of a tetrahedron in the softbody's collision mesh that contains the point to be attached to the softbody0
[in]tetBarycentric1The barycentric coordinates of the attachment point inside the tetrahedron specified by tetIdx1
[in]constraintThe user defined cone distance limit constraint to limit the movement between tets.
Returns
Returns a handle that identifies the attachment created. This handle can be used to release the attachment later

Implements physx::PxSoftBody.

◆ addSoftBodyFilter()

virtual void physx::NpSoftBody::addSoftBodyFilter ( PxSoftBody *  otherSoftBody,
PxU32  otherTetIdx,
PxU32  tetIdx1 
)
virtual

Creates collision filter between a tetrahedron in a soft body and a tetrahedron in another soft body.

Parameters
[in]otherSoftBodyThe other soft body actor used for collision filter
[in]otherTetIdxThe index of the tetrahedron in the other softbody's collision mesh to be filtered.
[in]tetIdx1The index of the tetrahedron in the softbody's collision mesh to be filtered.

Implements physx::PxSoftBody.

◆ addSoftBodyFilters()

virtual void physx::NpSoftBody::addSoftBodyFilters ( PxSoftBody *  otherSoftBody,
PxU32 *  otherTetIndices,
PxU32 *  tetIndices,
PxU32  tetIndicesSize 
)
virtual

Creates collision filters between a tetrahedron in a soft body with another soft body.

Parameters
[in]otherSoftBodyThe other soft body actor used for collision filter
[in]otherTetIndicesThe indices of the tetrahedron in the other softbody's collision mesh to be filtered.
[in]tetIndicesThe indices of the tetrahedron of the softbody's collision mesh to be filtered.
[in]tetIndicesSizeThe size of tetIndices.

Implements physx::PxSoftBody.

◆ addTetRigidAttachment()

virtual PxU32 physx::NpSoftBody::addTetRigidAttachment ( PxRigidActor *  actor,
PxU32  tetIdx,
const PxVec4 &  barycentric,
const PxVec3 &  actorSpacePose,
PxConeLimitedConstraint *  constraint 
)
virtual

Creates a rigid attachment between a soft body and a rigid body. Be aware that destroying the rigid body before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the rigid body does not.

This method attaches a point inside a tetrahedron of the collision to the rigid body.

Parameters
[in]actorThe rigid body actor used for the attachment
[in]tetIdxThe index of a tetrahedron in the softbody's collision mesh that contains the point to be attached to the rigid body
[in]barycentricThe barycentric coordinates of the attachment point inside the tetrahedron specified by tetIdx
[in]actorSpacePoseThe location of the attachment point expressed in the rigid body's coordinate system.
[in]constraintThe user defined cone distance limit constraint to limit the movement between a tet and rigid body.
Returns
Returns a handle that identifies the attachment created. This handle can be used to release the attachment later

Implements physx::PxSoftBody.

◆ addTetRigidFilter()

virtual void physx::NpSoftBody::addTetRigidFilter ( PxRigidActor *  actor,
PxU32  tetIdx 
)
virtual

Creates collision filter between a tetrahedron in a soft body and a rigid body.

Parameters
[in]actorThe rigid body actor used for collision filter
[in]tetIdxThe index of a tetrahedron in the softbody's collision mesh whose collisions with the rigid body is filtered.

Implements physx::PxSoftBody.

◆ attachShape()

virtual bool physx::NpSoftBody::attachShape ( PxShape &  shape)
virtual

Attaches a shape.

Attaches the shape to use for collision detection

Parameters
[in]shapeThe shape to use for collisions
Returns
Returns true if the operation was successful

Implements physx::PxSoftBody.

◆ attachSimulationMesh()

virtual bool physx::NpSoftBody::attachSimulationMesh ( PxTetrahedronMesh &  simulationMesh,
PxSoftBodyAuxData &  softBodyAuxData 
)
virtual

Attaches a simulation mesh.

Attaches the simulation mesh (geometry) and a state containing inverse mass, rest pose etc. required to compute the softbody deformation.

Parameters
[in]simulationMeshThe tetrahedral mesh used to compute the softbody's deformation
[in]softBodyAuxDataA state that contain a mapping from simulation to collision mesh, volume information etc.
Returns
Returns true if the operation was successful

Implements physx::PxSoftBody.

◆ detachShape()

virtual void physx::NpSoftBody::detachShape ( )
virtual

Detaches the shape.

Detaches the shape used for collision detection.

See also
void detachSimulationMesh()

Implements physx::PxSoftBody.

◆ detachSimulationMesh()

virtual void physx::NpSoftBody::detachSimulationMesh ( )
virtual

Detaches the simulation mesh.

Detaches the simulation mesh and simulation state used to compute the softbody deformation.

See also
void detachShape()

Implements physx::PxSoftBody.

◆ getCollisionMesh()

virtual PxTetrahedronMesh * physx::NpSoftBody::getCollisionMesh ( )
virtual

Retrieve the collision mesh pointer.

Allows to access the geometry of the tetrahedral mesh used to perform collision detection

Returns
Pointer to the collision mesh

Implements physx::PxSoftBody.

◆ getCudaContextManager()

virtual PxCudaContextManager * physx::NpSoftBody::getCudaContextManager ( ) const
virtual

Return the cuda context manager.

Returns
The cuda context manager

Implements physx::PxSoftBody.

◆ getGpuSoftBodyIndex()

virtual PxU32 physx::NpSoftBody::getGpuSoftBodyIndex ( )
virtual

Returns the GPU soft body index.

Returns
The GPU index, or 0xFFFFFFFF if the soft body is not in a scene.

Implements physx::PxSoftBody.

◆ getKinematicTargetCPU()

virtual PxBuffer * physx::NpSoftBody::getKinematicTargetCPU ( )
inlinevirtual

Access to the vertices of the simulation mesh on the host.

Each element uses 4 float values containing position and inverseMass per vertex [x, y, z, inverseMass] The inverse mass must match the inverse mass in the simVelocityCPU buffer at the same index. A copy of this value is stored in the simVelocityCPU buffer to allow for faster access on the GPU. If the inverse masses in those two buffers don't match, the simulation may produce wrong results

Allows to access the CPU buffer of the simulation mesh's vertices

Returns
The buffer that contains the simulation mesh's vertex positions (x, y, z) and the inverse mass as 4th component

Implements physx::PxSoftBody.

◆ getName()

const char * physx::NpSoftBody::getName ( ) const
virtual

Retrieves the name string set with setName().

Returns
Name string associated with object.
See also
setName()

Reimplemented from physx::NpActorTemplate< PxSoftBody >.

◆ getParameter()

virtual PxFEMParameters physx::NpSoftBody::getParameter ( ) const
virtual

Get parameter for FEM internal solve.

Returns
The FEM parameters

Implements physx::PxSoftBody.

◆ getPositionInvMassCPU()

virtual PxBuffer * physx::NpSoftBody::getPositionInvMassCPU ( )
inlinevirtual

Access to the vertices of the collision mesh on the host.

Each element uses 4 float values containing position and inverseMass per vertex [x, y, z, inverseMass] The inverse mass on the collision mesh has no effect, it can be set to an arbitrary value.

Allows to access the CPU buffer of the collision mesh's vertices

Returns
The buffer that contains the collision mesh's vertex positions (x, y, z) and the inverse mass as 4th component

Implements physx::PxSoftBody.

◆ getRestPositionInvMassCPU()

virtual PxBuffer * physx::NpSoftBody::getRestPositionInvMassCPU ( )
inlinevirtual

Access to the rest vertices of the collision mesh on the host.

Each element uses 4 float values containing position and inverseMass per vertex [x, y, z, inverseMass] The inverse mass on the collision mesh has no effect, it can be set to an arbitrary value.

Allows to access the CPU buffer of the collision mesh's rest vertices

Returns
The buffer that contains the collision mesh's rest vertex positions (x, y, z) and the inverse mass as 4th component

Implements physx::PxSoftBody.

◆ getShape()

virtual PxShape * physx::NpSoftBody::getShape ( )
virtual

Retrieves the shape pointer belonging to the actor.

Returns
Pointer to the collision mesh's shape
See also
PxShape getNbShapes() PxShape::release()

Implements physx::PxSoftBody.

◆ getSimPositionInvMassCPU()

virtual PxBuffer * physx::NpSoftBody::getSimPositionInvMassCPU ( )
inlinevirtual

Access to the vertices of the simulation mesh on the host.

Each element uses 4 float values containing position and inverseMass per vertex [x, y, z, inverseMass] The inverse mass must match the inverse mass in the simVelocityCPU buffer at the same index. A copy of this value is stored in the simVelocityCPU buffer to allow for faster access on the GPU. If the inverse masses in those two buffers don't match, the simulation may produce wrong results

Allows to access the CPU buffer of the simulation mesh's vertices

Returns
The buffer that contains the simulation mesh's vertex positions (x, y, z) and the inverse mass as 4th component

Implements physx::PxSoftBody.

◆ getSimulationMesh()

virtual PxTetrahedronMesh * physx::NpSoftBody::getSimulationMesh ( )
virtual

Retrieves the simulation mesh pointer.

Allows to access the geometry of the tetrahedral mesh used to compute the object's deformation

Returns
Pointer to the simulation mesh

Implements physx::PxSoftBody.

◆ getSimVelocityInvMassCPU()

virtual PxBuffer * physx::NpSoftBody::getSimVelocityInvMassCPU ( )
inlinevirtual

Access to the velocities of the simulation mesh on the host.

Each element uses 4 float values containing velocity and inverseMass per vertex [x, y, z, inverseMass] The inverse mass must match the inverse mass in the simPositionInvMassCPU buffer at the same index. A copy of this value is stored in the simPositionInvMassCPU buffer to allow for faster access on the GPU. If the inverse masses in those two buffers don't match, the simulation may produce wrong results

Allows to access the CPU buffer of the simulation mesh's vertices

Returns
The buffer that contains the simulation mesh's velocities (x, y, z) and the inverse mass as 4th component

Implements physx::PxSoftBody.

◆ getSoftBodyAuxData()

virtual PxSoftBodyAuxData * physx::NpSoftBody::getSoftBodyAuxData ( )
virtual

Retrieves the simulation state pointer.

Allows to access the additional data of the simulation mesh (inverse mass, rest state etc.). The geometry part of the data is stored in the simulation mesh.

Returns
Pointer to the simulation state

Implements physx::PxSoftBody.

◆ getSoftBodyFlag()

virtual PxSoftBodyFlags physx::NpSoftBody::getSoftBodyFlag ( ) const
virtual

Get the softbody flags.

Returns
The softbody flags

Implements physx::PxSoftBody.

◆ getSolverIterationCounts()

virtual void physx::NpSoftBody::getSolverIterationCounts ( PxU32 &  minPositionIters,
PxU32 &  minVelocityIters 
) const
virtual

Retrieves the solver iteration counts.

See also
setSolverIterationCounts()

Implements physx::PxSoftBody.

◆ getType()

virtual PxActorType::Enum physx::NpSoftBody::getType ( ) const
inlinevirtual

Retrieves the type of actor.

Returns
The actor type of the actor.
See also
PxActorType

Implements physx::NpActorTemplate< PxSoftBody >.

◆ getWakeCounter()

virtual PxReal physx::NpSoftBody::getWakeCounter ( ) const
virtual

Returns the wake counter of the soft body.

Returns
The wake counter of the soft body.
See also
isSleeping() setWakeCounter()

Implements physx::PxSoftBody.

◆ getWorldBounds()

virtual PxBounds3 physx::NpSoftBody::getWorldBounds ( float  inflation = 1.01f) const
virtual

Retrieves the axis aligned bounding box enclosing the soft body.

Note
It is not allowed to use this method while the simulation is running (except during PxScene::collide(), in PxContactModifyCallback or in contact report callbacks).
Parameters
[in]inflationScale factor for computed world bounds. Box extents are multiplied by this value.
Returns
The soft body's bounding box.
See also
PxBounds3

Implements physx::NpActorTemplate< PxSoftBody >.

◆ isSleeping()

virtual bool physx::NpSoftBody::isSleeping ( ) const
virtual

Returns true if this soft body is sleeping.

When an actor does not move for a period of time, it is no longer simulated in order to save time. This state is called sleeping. However, because the object automatically wakes up when it is either touched by an awake object, or a sleep-affecting property is changed by the user, the entire sleep mechanism should be transparent to the user.

A soft body can only go to sleep if all vertices are ready for sleeping. A soft body is guaranteed to be awake if at least one of the following holds:

  • The wake counter is positive (
    See also
    setWakeCounter()).
  • The velocity of any vertex is above the sleep threshold.

If a soft body is sleeping, the following state is guaranteed:

  • The wake counter is zero.
  • The linear velocity of all vertices is zero.

When a soft body gets inserted into a scene, it will be considered asleep if all the points above hold, else it will be treated as awake.

Note
It is invalid to use this method if the soft body has not been added to a scene already.
Returns
True if the soft body is sleeping.
See also
isSleeping()

Implements physx::PxSoftBody.

◆ readData() [1/2]

virtual void physx::NpSoftBody::readData ( PxSoftBodyData::Enum  flags,
bool  flush 
)
virtual

Issues a read command to the PxSoftBody.

Read operations are scheduled and then flushed in PxScene::simulate(). Read operations are known to be finished when PxBuffer::map() returns.

PxSoftBodyData::ePOSITION_INVMASS, PxSoftBodyData::eSIM_POSITION_INVMASS and PxSoftBodyData::eSIM_VELOCITY can be read from the PxSoftBody.

The data to read from the GPU is written to the corresponding cpu buffer that a softbody provides. Those cpu buffers are accessible through getPositionInvMassCPU(), getSimPositionInvMassCPU() or getSimVelocityInvMassCPU().

Parameters
[in]flagsSpecifies which PxSoftBody data to read from.
[in]flushIf set to true the command gets executed immediately, otherwise it will get executed the next time copy commands are flushed.
See also
writeData(), PxSoftBodyData

Implements physx::PxSoftBody.

◆ readData() [2/2]

virtual void physx::NpSoftBody::readData ( PxSoftBodyData::Enum  flags,
PxBuffer &  buffer,
bool  flush 
)
virtual

Issues a read command to the PxSoftBody.

Read operations are scheduled and then flushed in PxScene::simulate(). Read operations are known to be finished when PxBuffer::map() returns.

PxSoftBodyData::ePOSITION_INVMASS, PxSoftBodyData::eSIM_POSITION_INVMASS and PxSoftBodyData::eSIM_VELOCITY can be read from the PxSoftBody.

The softbody class offers internal cpu buffers that can be used to hold the data. The cpu buffers are accessible through getPositionInvMassCPU(), getSimPositionInvMassCPU() and getSimVelocityInvMassCPU().

Parameters
[in]flagsSpecifies which PxSoftBody data to read from.
[in]bufferSpecifies buffer to which data is written to.
[in]flushIf set to true the command gets executed immediately, otherwise it will get executed the next time copy commands are flushed.
See also
writeData(), PxBuffer, PxSoftBodyData

Implements physx::PxSoftBody.

◆ release()

virtual void physx::NpSoftBody::release ( )
virtual

Releases the softbody.

Releases the softbody and frees its resources.

Implements physx::NpActorTemplate< PxSoftBody >.

◆ removeClothAttachment()

virtual void physx::NpSoftBody::removeClothAttachment ( PxFEMCloth *  cloth,
PxU32  handle 
)
virtual

Releases an attachment between a cloth and a soft body. Be aware that destroying the cloth before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the cloth does not.

This method removes a previously-created attachment between a point inside a collision mesh tetrahedron and a point inside a cloth mesh.

Warning
Feature under development, only for internal usage.
Parameters
[in]clothThe cloth actor used for the attachment
[in]handleIndex that identifies the attachment. This handle gets returned by the addClothAttachment when the attachment is created

Implements physx::PxSoftBody.

◆ removeClothFilter()

virtual void physx::NpSoftBody::removeClothFilter ( PxFEMCloth *  cloth,
PxU32  triIdx,
PxU32  tetIdx 
)
virtual

Removes collision filter between a tetrahedron in a soft body and a triangle in a cloth.

Warning
Feature under development, only for internal usage.
Parameters
[in]clothThe cloth actor used for collision filter
[in]triIdxThe index of the triangle in the cloth mesh to be filtered.
[in]tetIdxThe index of the tetrahedron in the softbody's collision mesh to be filtered.

Implements physx::PxSoftBody.

◆ removeParticleAttachment()

virtual void physx::NpSoftBody::removeParticleAttachment ( PxPBDParticleSystem *  particlesystem,
PxU32  handle 
)
virtual

Removes an attachment between a particle and a soft body. Be aware that destroying the particle system before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the particle system does not.

Parameters
[in]particlesystemThe particle system used for the attachment
[in]handleIndex that identifies the attachment. This handle gets returned by the addParticleAttachment when the attachment is created

Implements physx::PxSoftBody.

◆ removeParticleFilter()

virtual void physx::NpSoftBody::removeParticleFilter ( PxPBDParticleSystem *  particlesystem,
const PxParticleBuffer *  buffer,
PxU32  particleId,
PxU32  tetId 
)
virtual

Removes a collision filter between a particle and a tetrahedron in the soft body's collision mesh.

Parameters
[in]particlesystemThe particle system used for the collision filter
[in]bufferThe PxParticleBuffer to which the particle belongs to.
[in]particleIdThe particle whose collisions with the tetrahedron in the soft body are filtered.
[in]tetIdThe tetrahedron in the soft body is filtered.

Implements physx::PxSoftBody.

◆ removeRigidAttachment()

virtual void physx::NpSoftBody::removeRigidAttachment ( PxRigidActor *  actor,
PxU32  handle 
)
virtual

Releases a rigid attachment between a soft body and a rigid body. Be aware that destroying the rigid body before destroying the attachment is illegal and may cause a crash. The soft body keeps track of these attachments but the rigid body does not.

This method removes a previously-created attachment between a vertex of the soft body collision mesh and the rigid body.

Parameters
[in]actorThe rigid body actor used for the attachment
[in]handleIndex that identifies the attachment. This handle gets returned by the addRigidAttachment when the attachment is created

Implements physx::PxSoftBody.

◆ removeRigidFilter()

virtual void physx::NpSoftBody::removeRigidFilter ( PxRigidActor *  actor,
PxU32  vertId 
)
virtual

Removes a collision filter between a vertex in a soft body and a rigid body.

Parameters
[in]actorThe rigid body actor used for the collision filter
[in]vertIdThe index of a vertex in the softbody's collision mesh whose collisions with the rigid body are filtered.

Implements physx::PxSoftBody.

◆ removeSoftBodyAttachment()

virtual void physx::NpSoftBody::removeSoftBodyAttachment ( PxSoftBody *  softbody0,
PxU32  handle 
)
virtual

Releases an attachment between a soft body and the other soft body. Be aware that destroying the soft body before destroying the attachment is illegal and may cause a crash.

This method removes a previously-created attachment between a point inside a tetrahedron of the collision mesh to a point in another soft body's tetrahedron collision mesh.

Parameters
[in]softbody0The softbody actor used for the attachment.
[in]handleIndex that identifies the attachment. This handle gets returned by the addSoftBodyAttachment when the attachment is created.

Implements physx::PxSoftBody.

◆ removeSoftBodyFilter()

virtual void physx::NpSoftBody::removeSoftBodyFilter ( PxSoftBody *  otherSoftBody,
PxU32  otherTetIdx,
PxU32  tetIdx1 
)
virtual

Removes collision filter between a tetrahedron in a soft body and a tetrahedron in other soft body.

Parameters
[in]otherSoftBodyThe other soft body actor used for collision filter
[in]otherTetIdxThe index of the other tetrahedron in the other softbody's collision mesh whose collision with the tetrahedron with the soft body is filtered.
[in]tetIdx1The index of the tetrahedron in the softbody's collision mesh whose collision with the other tetrahedron with the other soft body is filtered.

Implements physx::PxSoftBody.

◆ removeSoftBodyFilters()

virtual void physx::NpSoftBody::removeSoftBodyFilters ( PxSoftBody *  otherSoftBody,
PxU32 *  otherTetIndices,
PxU32 *  tetIndices,
PxU32  tetIndicesSize 
)
virtual

Removes collision filters between a tetrahedron in a soft body with another soft body.

Parameters
[in]otherSoftBodyThe other soft body actor used for collision filter
[in]otherTetIndicesThe indices of the tetrahedron in the other softbody's collision mesh to be filtered.
[in]tetIndicesThe indices of the tetrahedron of the softbody's collision mesh to be filtered.
[in]tetIndicesSizeThe size of tetIndices.

Implements physx::PxSoftBody.

◆ removeTetRigidFilter()

virtual void physx::NpSoftBody::removeTetRigidFilter ( PxRigidActor *  actor,
PxU32  tetIdx 
)
virtual

Removes collision filter between a tetrahedron in a soft body and a rigid body.

Parameters
[in]actorThe rigid body actor used for collision filter
[in]tetIdxThe index of a tetrahedron in the softbody's collision mesh whose collisions with the rigid body is filtered.

Implements physx::PxSoftBody.

◆ setName()

void physx::NpSoftBody::setName ( const char *  name)
virtual

Sets a name string for the object that can be retrieved with getName().

This is for debugging and is not used by the SDK. The string is not copied by the SDK, only the pointer is stored.

Parameters
[in]nameString to set the objects name to.

Default: NULL

See also
getName()

Reimplemented from physx::NpActorTemplate< PxSoftBody >.

◆ setParameter()

virtual void physx::NpSoftBody::setParameter ( const PxFEMParameters  parameters)
virtual

Set parameter for FEM internal solve.

Parameters
[in]parametersThe FEM parameters

Implements physx::PxSoftBody.

◆ setSoftBodyFlag()

virtual void physx::NpSoftBody::setSoftBodyFlag ( PxSoftBodyFlag::Enum  flag,
bool  val 
)
virtual

Set a single softbody flag.

Parameters
[in]flagThe flag to set or clear
[in]valThe new state of the flag

Implements physx::PxSoftBody.

◆ setSoftBodyFlags()

virtual void physx::NpSoftBody::setSoftBodyFlags ( PxSoftBodyFlags  flags)
virtual

Set the softbody flags.

Parameters
[in]flagsThe new softbody flags

Implements physx::PxSoftBody.

◆ setSolverIterationCounts()

virtual void physx::NpSoftBody::setSolverIterationCounts ( PxU32  minPositionIters,
PxU32  minVelocityIters 
)
virtual

Sets the solver iteration counts for the body.

The solver iteration count determines how accurately deformation and contacts are resolved. If you are having trouble with softbodies that are not as stiff as they should be, then setting a higher position iteration count may improve the behavior.

If intersecting bodies are being depenetrated too violently, increase the number of velocity iterations.

Default: 4 position iterations, 1 velocity iteration

Parameters
[in]minPositionItersMinimal number of position iterations the solver should perform for this body. Range: [1,255]
[in]minVelocityItersMinimal number of velocity iterations the solver should perform for this body. Range: [1,255]
See also
getSolverIterationCounts()

Implements physx::PxSoftBody.

◆ setWakeCounter()

virtual void physx::NpSoftBody::setWakeCounter ( PxReal  wakeCounterValue)
virtual

Sets the wake counter for the soft body.

The wake counter value determines the minimum amount of time until the soft body can be put to sleep. Please note that a soft body will not be put to sleep if any vertex velocity is above the specified threshold or if other awake objects are touching it.

Note
Passing in a positive value will wake the soft body up automatically.

Default: 0.4 (which corresponds to 20 frames for a time step of 0.02)

Parameters
[in]wakeCounterValueWake counter value. Range: [0, PX_MAX_F32)
See also
isSleeping() getWakeCounter()

Implements physx::PxSoftBody.

◆ writeData() [1/2]

virtual void physx::NpSoftBody::writeData ( PxSoftBodyData::Enum  flags,
bool  flush 
)
virtual

Issues a write command to the PxSoftBody.

Write operations are scheduled and then flushed in PxScene::simulate(). Write operations are known to be finished when PxScene::fetchResult() returns.

PxSoftBodyData::eSIM_POSITION_INVMASS and PxSoftBodyData::eSIM_VELOCITY can be written to the PxSoftBody. PxSoftBodyData::ePOSITION_INVMASS is read only, because the collision-mesh vertices are driven by the simulation-mesh vertices, which can be written to with PxSoftBodyData::eSIM_POSITION_INVMASS.

The data to write to the GPU is taken from the corresponding cpu buffer that a softbody provides. Those cpu buffers are accessible through getPositionInvMassCPU(), getSimPositionInvMassCPU() or getSimVelocityInvMassCPU().

Parameters
[in]flagsSpecifies which PxSoftBody data to write to.
[in]flushIf set to true the command gets executed immediately, otherwise it will get executed the next time copy commands are flushed.
See also
readData(), PxSoftBodyData

Implements physx::PxSoftBody.

◆ writeData() [2/2]

virtual void physx::NpSoftBody::writeData ( PxSoftBodyData::Enum  flags,
PxBuffer &  buffer,
bool  flush 
)
virtual

Issues a write command to the PxSoftBody.

Write operations are scheduled and then flushed in PxScene::simulate(). Write operations are known to be finished when PxScene::fetchResult() returns.

PxSoftBodyData::eSIM_POSITION_INVMASS and PxSoftBodyData::eSIM_VELOCITY can be written to the PxSoftBody. PxSoftBodyData::ePOSITION_INVMASS is read only, because the collision-mesh vertices are driven by the simulation-mesh vertices, which can be written to with PxSoftBodyData::eSIM_POSITION_INVMASS.

The softbody class offers internal cpu buffers that can be used to hold the data. The cpu buffers are accessible through getPositionInvMassCPU(), getSimPositionInvMassCPU() and getSimVelocityInvMassCPU(). Consider to use the PxSoftBodyExt::commit() extension method if all buffers should get written.

Parameters
[in]flagsSpecifies which PxSoftBody data to write to.
[in]bufferSpecifies buffer from which data is read.
[in]flushIf set to true the command gets executed immediately, otherwise it will get executed the next time copy commands are flushed.
See also
readData(), PxBuffer, PxSoftBodyData, PxSoftBodyExt::commit

Implements physx::PxSoftBody.


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