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

Public Member Functions

 NpShape (PxBaseFlags baseFlags)
 
void preExportDataReset ()
 
virtual void exportExtraData (PxSerializationContext &context)
 
void importExtraData (PxDeserializationContext &context)
 
virtual void requiresObjects (PxProcessPxBaseCallback &c)
 
void resolveReferences (PxDeserializationContext &context)
 
 NpShape (const PxGeometry &geometry, PxShapeFlags shapeFlags, const PxU16 *materialIndices, PxU16 materialCount, bool isExclusive, PxShapeCoreFlag::Enum flag=PxShapeCoreFlag::Enum(0))
 
virtual PxU32 getReferenceCount () const PX_OVERRIDE
 Returns the reference count of the object.
 
virtual void acquireReference () PX_OVERRIDE
 Acquires a counted reference to this object.
 
virtual void release () PX_OVERRIDE
 call to release from actor
 
virtual void setGeometry (const PxGeometry &) PX_OVERRIDE
 Adjust the geometry of the shape.
 
virtual const PxGeometry & getGeometry () const PX_OVERRIDE
 Retrieve a reference to the shape's geometry.
 
virtual PxRigidActor * getActor () const PX_OVERRIDE
 Retrieves the actor which this shape is associated with.
 
virtual void setLocalPose (const PxTransform &pose) PX_OVERRIDE
 Sets the pose of the shape in actor space, i.e. relative to the actors to which they are attached.
 
virtual PxTransform getLocalPose () const PX_OVERRIDE
 Retrieves the pose of the shape in actor space, i.e. relative to the actor they are owned by.
 
virtual void setSimulationFilterData (const PxFilterData &data) PX_OVERRIDE
 Sets the user definable collision filter data.
 
virtual PxFilterData getSimulationFilterData () const PX_OVERRIDE
 Retrieves the shape's collision filter data.
 
virtual void setQueryFilterData (const PxFilterData &data) PX_OVERRIDE
 Sets the user definable query filter data.
 
virtual PxFilterData getQueryFilterData () const PX_OVERRIDE
 Retrieves the shape's Query filter data.
 
virtual void setMaterials (PxMaterial *const *materials, PxU16 materialCount) PX_OVERRIDE
 Assigns material(s) to the shape. Will remove existing materials from the shape.
 
virtual void setSoftBodyMaterials (PxFEMSoftBodyMaterial *const *materials, PxU16 materialCount) PX_OVERRIDE
 Assigns FEM soft body material(s) to the shape. Will remove existing materials from the shape.
 
virtual void setClothMaterials (PxFEMClothMaterial *const *materials, PxU16 materialCount) PX_OVERRIDE
 Assigns FEM cloth material(s) to the shape. Will remove existing materials from the shape.
 
virtual PxU16 getNbMaterials () const PX_OVERRIDE
 Returns the number of materials assigned to the shape.
 
virtual PxU32 getMaterials (PxMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Retrieve all the material pointers associated with the shape.
 
virtual PxU32 getSoftBodyMaterials (PxFEMSoftBodyMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Retrieve all the FEM soft body material pointers associated with the shape.
 
virtual PxU32 getClothMaterials (PxFEMClothMaterial **userBuffer, PxU32 bufferSize, PxU32 startIndex=0) const PX_OVERRIDE
 Retrieve all the FEM cloth material pointers associated with the shape.
 
virtual PxBaseMaterial * getMaterialFromInternalFaceIndex (PxU32 faceIndex) const PX_OVERRIDE
 Retrieve material from given triangle index.
 
virtual void setContactOffset (PxReal) PX_OVERRIDE
 Sets the contact offset.
 
virtual PxReal getContactOffset () const PX_OVERRIDE
 Retrieves the contact offset.
 
virtual void setRestOffset (PxReal) PX_OVERRIDE
 Sets the rest offset.
 
virtual PxReal getRestOffset () const PX_OVERRIDE
 Retrieves the rest offset.
 
virtual void setDensityForFluid (PxReal) PX_OVERRIDE
 Sets the density used to interact with fluids.
 
virtual PxReal getDensityForFluid () const PX_OVERRIDE
 Retrieves the density used to interact with fluids.
 
virtual void setTorsionalPatchRadius (PxReal) PX_OVERRIDE
 Sets torsional patch radius.
 
virtual PxReal getTorsionalPatchRadius () const PX_OVERRIDE
 Gets torsional patch radius.
 
virtual void setMinTorsionalPatchRadius (PxReal) PX_OVERRIDE
 Sets minimum torsional patch radius.
 
virtual PxReal getMinTorsionalPatchRadius () const PX_OVERRIDE
 Gets minimum torsional patch radius.
 
virtual void setFlag (PxShapeFlag::Enum flag, bool value) PX_OVERRIDE
 Sets shape flags.
 
virtual void setFlags (PxShapeFlags inFlags) PX_OVERRIDE
 Sets shape flags.
 
virtual PxShapeFlags getFlags () const PX_OVERRIDE
 Retrieves shape flags.
 
virtual bool isExclusive () const PX_OVERRIDE
 Returns true if the shape is exclusive to an actor.
 
virtual void setName (const char *debugName) PX_OVERRIDE
 Sets a name string for the object that can be retrieved with getName().
 
virtual const char * getName () const PX_OVERRIDE
 retrieves the name string set with setName().
 
virtual void onRefCountZero () PX_OVERRIDE
 
PX_FORCE_INLINE PxShapeFlags getFlagsFast () const
 
PX_FORCE_INLINE const PxTransform & getLocalPoseFast () const
 
PX_FORCE_INLINE PxGeometryType::Enum getGeometryTypeFast () const
 
PX_FORCE_INLINE const PxFilterData & getQueryFilterDataFast () const
 
PX_FORCE_INLINE PxU32 getActorCount () const
 
PX_FORCE_INLINE bool isExclusiveFast () const
 
PX_FORCE_INLINE const Sc::ShapeCore & getCore () const
 
PX_FORCE_INLINE Sc::ShapeCore & getCore ()
 
template<typename PxMaterialType , typename NpMaterialType >
PX_INLINE PxMaterialType * getMaterial (PxU32 index) const
 
PX_FORCE_INLINE void setSceneIfExclusive (NpScene *s)
 
void releaseInternal ()
 
void onActorAttach (PxActor &actor)
 
void onActorDetach ()
 
void incActorCount ()
 
void decActorCount ()
 
PX_FORCE_INLINE PxU32 getShapeManagerArrayIndex (const Cm::PtrTable &shapes) const
 
PX_FORCE_INLINE bool checkShapeManagerArrayIndex (const Cm::PtrTable &shapes) const
 
PX_FORCE_INLINE void setShapeManagerArrayIndex (const PxU32 id)
 
PX_FORCE_INLINE void clearShapeManagerArrayIndex ()
 
PX_FORCE_INLINE PxRigidActor * getRigidActor () const
 
- Public Member Functions inherited from physx::PxShape
PX_DEPRECATED PX_FORCE_INLINE PxGeometryType::Enum getGeometryType () const
 Get the geometry type of the shape.
 
PX_DEPRECATED PX_FORCE_INLINE bool getBoxGeometry (PxBoxGeometry &geometry) const
 Fetch the geometry of the shape.
 
PX_DEPRECATED PX_FORCE_INLINE bool getSphereGeometry (PxSphereGeometry &geometry) const
 Fetch the geometry of the shape.
 
PX_DEPRECATED PX_FORCE_INLINE bool getCapsuleGeometry (PxCapsuleGeometry &geometry) const
 Fetch the geometry of the shape.
 
PX_DEPRECATED PX_FORCE_INLINE bool getPlaneGeometry (PxPlaneGeometry &geometry) const
 Fetch the geometry of the shape.
 
PX_DEPRECATED PX_FORCE_INLINE bool getConvexMeshGeometry (PxConvexMeshGeometry &geometry) const
 Fetch the geometry of the shape.
 
PX_DEPRECATED PX_FORCE_INLINE bool getTriangleMeshGeometry (PxTriangleMeshGeometry &geometry) const
 Fetch the geometry of the shape.
 
PX_DEPRECATED PX_FORCE_INLINE bool getTetrahedronMeshGeometry (PxTetrahedronMeshGeometry &geometry) const
 Fetch the geometry of the shape.
 
PX_DEPRECATED PX_FORCE_INLINE bool getParticleSystemGeometry (PxParticleSystemGeometry &geometry) const
 Fetch the geometry of the shape.
 
PX_DEPRECATED PX_FORCE_INLINE bool getHeightFieldGeometry (PxHeightFieldGeometry &geometry) const
 Fetch the geometry of the shape.
 
PX_DEPRECATED PX_FORCE_INLINE bool getCustomGeometry (PxCustomGeometry &geometry) const
 Fetch the geometry of the shape.
 
virtual const char * getConcreteTypeName () const
 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::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 NpShape * createObject (PxU8 *&address, PxDeserializationContext &context)
 
static void getBinaryMetaData (PxOutputStream &stream)
 
static PX_FORCE_INLINE size_t getCoreOffset ()
 
template<typename PxMaterialType >
static PX_INLINE bool checkMaterialSetup (const PxGeometry &geom, const char *errorMsgPrefix, PxMaterialType *const *materials, PxU16 materialCount)
 
- Static Public Member Functions inherited from physx::NpBase
static void getBinaryMetaData (PxOutputStream &stream)
 

Additional Inherited Members

- Public Attributes inherited from physx::PxShape
void * userData
 user can assign this to whatever, usually to create a 1:1 relationship with a user object.
 
- Protected Member Functions inherited from physx::PxShape
PX_INLINE PxShape (PxBaseFlags baseFlags)
 
PX_INLINE PxShape (PxType concreteType, PxBaseFlags baseFlags)
 
virtual bool isKindOf (const char *name) const
 Returns whether a given type name matches with the type of this instance.
 
template<class T >
PX_FORCE_INLINE bool getGeometryT (PxGeometryType::Enum type, T &geom) const
 
- Protected Member Functions inherited from physx::PxRefCounted
PX_INLINE PxRefCounted (PxType concreteType, PxBaseFlags baseFlags)
 
PX_INLINE PxRefCounted (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::NpBase
PxU32 mFreeSlot
 

Member Function Documentation

◆ acquireReference()

void NpShape::acquireReference ( )
virtual

Acquires a counted reference to this object.

This method increases the reference count of the object by 1. Decrement the reference count by calling release()

Implements physx::PxRefCounted.

◆ getActor()

PxRigidActor * NpShape::getActor ( ) const
virtual

Retrieves the actor which this shape is associated with.

Returns
The actor this shape is associated with, if it is an exclusive shape, else NULL
See also
PxRigidStatic, PxRigidDynamic, PxArticulationLink

Implements physx::PxShape.

◆ getClothMaterials()

PxU32 NpShape::getClothMaterials ( PxFEMClothMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
virtual

Retrieve all the FEM cloth material pointers associated with the shape.

Warning
Feature under development, only for internal usage.

You can retrieve the number of material pointers by calling getNbMaterials()

Note: The returned data may contain invalid pointers if you release materials using PxMaterial::release().

Parameters
[out]userBufferThe buffer to store the material pointers.
[in]bufferSizeSize of provided user buffer.
[in]startIndexIndex of first material pointer to be retrieved
Returns
Number of material pointers written to the buffer.
See also
PxFEMClothMaterial getNbMaterials() PxMaterial::release()

Implements physx::PxShape.

◆ getContactOffset()

PxReal NpShape::getContactOffset ( ) const
virtual

Retrieves the contact offset.

Returns
The contact offset of the shape.
See also
setContactOffset()

Implements physx::PxShape.

◆ getDensityForFluid()

PxReal NpShape::getDensityForFluid ( ) const
virtual

Retrieves the density used to interact with fluids.

Returns
The density of the body when interacting with fluid.
See also
setDensityForFluid()

Implements physx::PxShape.

◆ getFlags()

PxShapeFlags NpShape::getFlags ( ) const
virtual

Retrieves shape flags.

Returns
The values of the shape flags.
See also
PxShapeFlag setFlag()

Implements physx::PxShape.

◆ getGeometry()

const PxGeometry & NpShape::getGeometry ( ) const
virtual

Retrieve a reference to the shape's geometry.

Warning
The returned reference has the same lifetime as the PxShape it comes from.
Returns
Reference to internal PxGeometry object.
See also
PxGeometry PxGeometryType getGeometryType() setGeometry()

Implements physx::PxShape.

◆ getLocalPose()

PxTransform NpShape::getLocalPose ( ) const
virtual

Retrieves the pose of the shape in actor space, i.e. relative to the actor they are owned by.

This transformation is identity by default.

Returns
Pose of shape relative to the actor's frame.
See also
setLocalPose()

Implements physx::PxShape.

◆ getMaterialFromInternalFaceIndex()

PxBaseMaterial * NpShape::getMaterialFromInternalFaceIndex ( PxU32  faceIndex) const
virtual

Retrieve material from given triangle index.

The input index is the internal triangle index as used inside the SDK. This is the index returned to users by various SDK functions such as raycasts.

This function is only useful for triangle meshes or heightfields, which have per-triangle materials. For other shapes or SDF triangle meshes, the function returns the single material associated with the shape, regardless of the index.

Parameters
[in]faceIndexThe internal triangle index whose material you want to retrieve.
Returns
Material from input triangle
Note
If faceIndex value of 0xFFFFffff is passed as an input for mesh and heightfield shapes, this function will issue a warning and return NULL.
Scene queries set the value of PxQueryHit::faceIndex to 0xFFFFffff whenever it is undefined or does not apply.
See also
PxMaterial getNbMaterials() PxMaterial::release()

Implements physx::PxShape.

◆ getMaterials()

PxU32 NpShape::getMaterials ( PxMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
virtual

Retrieve all the material pointers associated with the shape.

You can retrieve the number of material pointers by calling getNbMaterials()

Note: The returned data may contain invalid pointers if you release materials using PxMaterial::release().

Parameters
[out]userBufferThe buffer to store the material pointers.
[in]bufferSizeSize of provided user buffer.
[in]startIndexIndex of first material pointer to be retrieved
Returns
Number of material pointers written to the buffer.
See also
PxMaterial getNbMaterials() PxMaterial::release()

Implements physx::PxShape.

◆ getMinTorsionalPatchRadius()

PxReal NpShape::getMinTorsionalPatchRadius ( ) const
virtual

Gets minimum torsional patch radius.

This defines the minimum radius of the contact patch used to apply torsional friction. If the radius is 0, the amount of torsional friction that will be applied will be entirely dependent on the value of torsionalPatchRadius.

If the radius is > 0, some torsional friction will be applied regardless of the value of torsionalPatchRadius or the amount of penetration.

Returns
The minimum torsional patch radius of the shape.

Implements physx::PxShape.

◆ getName()

const char * NpShape::getName ( ) const
virtual

retrieves the name string set with setName().

Returns
The name associated with the shape.
See also
setName()

Implements physx::PxShape.

◆ getNbMaterials()

PxU16 NpShape::getNbMaterials ( ) const
virtual

Returns the number of materials assigned to the shape.

You can use getMaterials() to retrieve the material pointers.

Returns
Number of materials associated with this shape.
See also
PxMaterial getMaterials()

Implements physx::PxShape.

◆ getQueryFilterData()

PxFilterData NpShape::getQueryFilterData ( ) const
virtual

Retrieves the shape's Query filter data.

See also
setQueryFilterData()

Implements physx::PxShape.

◆ getReferenceCount()

PxU32 NpShape::getReferenceCount ( ) const
virtual

Returns the reference count of the object.

At creation, the reference count of the object is 1. Every other object referencing this object increments the count by 1. When the reference count reaches 0, and only then, the object gets destroyed automatically.

Returns
the current reference count.

Implements physx::PxRefCounted.

◆ getRestOffset()

PxReal NpShape::getRestOffset ( ) const
virtual

Retrieves the rest offset.

Returns
The rest offset of the shape.
See also
setRestOffset()

Implements physx::PxShape.

◆ getSimulationFilterData()

PxFilterData NpShape::getSimulationFilterData ( ) const
virtual

Retrieves the shape's collision filter data.

See also
setSimulationFilterData()

Implements physx::PxShape.

◆ getSoftBodyMaterials()

PxU32 NpShape::getSoftBodyMaterials ( PxFEMSoftBodyMaterial **  userBuffer,
PxU32  bufferSize,
PxU32  startIndex = 0 
) const
virtual

Retrieve all the FEM soft body material pointers associated with the shape.

You can retrieve the number of material pointers by calling getNbMaterials()

Note: The returned data may contain invalid pointers if you release materials using PxMaterial::release().

Parameters
[out]userBufferThe buffer to store the material pointers.
[in]bufferSizeSize of provided user buffer.
[in]startIndexIndex of first material pointer to be retrieved
Returns
Number of material pointers written to the buffer.
See also
PxFEMSoftBodyMaterial getNbMaterials() PxMaterial::release()

Implements physx::PxShape.

◆ getTorsionalPatchRadius()

PxReal NpShape::getTorsionalPatchRadius ( ) const
virtual

Gets torsional patch radius.

This defines the radius of the contact patch used to apply torsional friction. If the radius is 0, no torsional friction will be applied. If the radius is > 0, some torsional friction will be applied. This is proportional to the penetration depth so, if the shapes are separated or penetration is zero, no torsional friction will be applied. It is used to approximate rotational friction introduced by the compression of contacting surfaces.

Returns
The torsional patch radius of the shape.

Implements physx::PxShape.

◆ isExclusive()

bool NpShape::isExclusive ( ) const
virtual

Returns true if the shape is exclusive to an actor.

See also
PxPhysics::createShape()

Implements physx::PxShape.

◆ onRefCountZero()

void NpShape::onRefCountZero ( )
virtual

Reimplemented from physx::PxRefCounted.

◆ release()

void NpShape::release ( )
virtual

call to release from actor

Implements physx::PxShape.

◆ setClothMaterials()

void NpShape::setClothMaterials ( PxFEMClothMaterial *const *  materials,
PxU16  materialCount 
)
virtual

Assigns FEM cloth material(s) to the shape. Will remove existing materials from the shape.

Warning
Feature under development, only for internal usage.

Sleeping: Does NOT wake the associated actor up automatically.

Parameters
[in]materialsList of material pointers to assign to the shape. See #PxFEMClothMaterial
[in]materialCountThe number of materials provided.
See also
PxPhysics.createFEMClothMaterial() getClothMaterials()

Implements physx::PxShape.

◆ setContactOffset()

void NpShape::setContactOffset ( PxReal  contactOffset)
virtual

Sets the contact offset.

Shapes whose distance is less than the sum of their contactOffset values will generate contacts. The contact offset must be positive and greater than the rest offset. Having a contactOffset greater than than the restOffset allows the collision detection system to predictively enforce the contact constraint even when the objects are slightly separated. This prevents jitter that would occur if the constraint were enforced only when shapes were within the rest distance.

Default: 0.02f * PxTolerancesScale::length

Sleeping: Does NOT wake the associated actor up automatically.

Parameters
[in]contactOffsetRange: [maximum(0,restOffset), PX_MAX_F32)
See also
getContactOffset PxTolerancesScale setRestOffset

Implements physx::PxShape.

◆ setDensityForFluid()

void NpShape::setDensityForFluid ( PxReal  densityForFluid)
virtual

Sets the density used to interact with fluids.

To be physically accurate, the density of a rigid body should be computed as its mass divided by its volume. To simplify tuning the interaction of fluid and rigid bodies, the density for fluid can differ from the real density. This allows to create floating bodies, even if they are supposed to sink with their mass and volume.

Default: 800.0f

Parameters
[in]densityForFluidRange: (0, PX_MAX_F32)
See also
getDensityForFluid

notifyActorAndUpdatePVD(Sc::ShapeChangeNotifyFlag::eRESTOFFSET);

Implements physx::PxShape.

◆ setFlag()

void NpShape::setFlag ( PxShapeFlag::Enum  flag,
bool  value 
)
virtual

Sets shape flags.

Sleeping: Does NOT wake the associated actor up automatically.

Parameters
[in]flagThe shape flag to enable/disable. See #PxShapeFlag.
[in]valueTrue to set the flag. False to clear the flag specified in flag.

Default: PxShapeFlag::eVISUALIZATION | PxShapeFlag::eSIMULATION_SHAPE | PxShapeFlag::eSCENE_QUERY_SHAPE

See also
PxShapeFlag getFlags()

Implements physx::PxShape.

◆ setFlags()

void NpShape::setFlags ( PxShapeFlags  inFlags)
virtual

Sets shape flags.

See also
PxShapeFlag getFlags()

Implements physx::PxShape.

◆ setGeometry()

void NpShape::setGeometry ( const PxGeometry &  geometry)
virtual

Adjust the geometry of the shape.

Note
The type of the passed in geometry must match the geometry type of the shape.
It is not allowed to change the geometry type of a shape.
This function does not guarantee correct/continuous behavior when objects are resting on top of old or new geometry.
Parameters
[in]geometryNew geometry of the shape.
See also
PxGeometry PxGeometryType getGeometryType()

Implements physx::PxShape.

◆ setLocalPose()

void NpShape::setLocalPose ( const PxTransform &  pose)
virtual

Sets the pose of the shape in actor space, i.e. relative to the actors to which they are attached.

This transformation is identity by default.

The local pose is an attribute of the shape, and so will apply to all actors to which the shape is attached.

Sleeping: Does NOT wake the associated actor up automatically.

Note: Does not automatically update the inertia properties of the owning actor (if applicable); use the PhysX extensions method PxRigidBodyExt::updateMassAndInertia() to do this.

Default: the identity transform

Parameters
[in]poseThe new transform from the actor frame to the shape frame. Range: rigid body transform
See also
getLocalPose()

Implements physx::PxShape.

◆ setMaterials()

void NpShape::setMaterials ( PxMaterial *const *  materials,
PxU16  materialCount 
)
virtual

Assigns material(s) to the shape. Will remove existing materials from the shape.

Sleeping: Does NOT wake the associated actor up automatically.

Parameters
[in]materialsList of material pointers to assign to the shape. See #PxMaterial
[in]materialCountThe number of materials provided.
See also
PxPhysics.createMaterial() getMaterials()

Implements physx::PxShape.

◆ setMinTorsionalPatchRadius()

void NpShape::setMinTorsionalPatchRadius ( PxReal  radius)
virtual

Sets minimum torsional patch radius.

This defines the minimum radius of the contact patch used to apply torsional friction. If the radius is 0, the amount of torsional friction that will be applied will be entirely dependent on the value of torsionalPatchRadius.

If the radius is > 0, some torsional friction will be applied regardless of the value of torsionalPatchRadius or the amount of penetration.

Default: 0.0

Parameters
[in]radiusRange: (0, PX_MAX_F32)

Implements physx::PxShape.

◆ setName()

void NpShape::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.

Default: NULL

Parameters
[in]nameThe name string to set the objects name to.
See also
getName()

Implements physx::PxShape.

◆ setQueryFilterData()

void NpShape::setQueryFilterData ( const PxFilterData &  data)
virtual

Sets the user definable query filter data.

Default: (0,0,0,0)

See also
getQueryFilterData()

Implements physx::PxShape.

◆ setRestOffset()

void NpShape::setRestOffset ( PxReal  restOffset)
virtual

Sets the rest offset.

Two shapes will come to rest at a distance equal to the sum of their restOffset values. If the restOffset is 0, they should converge to touching exactly. Having a restOffset greater than zero is useful to have objects slide smoothly, so that they do not get hung up on irregularities of each others' surfaces.

Default: 0.0f

Sleeping: Does NOT wake the associated actor up automatically.

Parameters
[in]restOffsetRange: (-PX_MAX_F32, contactOffset)
See also
getRestOffset setContactOffset

Implements physx::PxShape.

◆ setSimulationFilterData()

void NpShape::setSimulationFilterData ( const PxFilterData &  data)
virtual

Sets the user definable collision filter data.

Sleeping: Does wake up the actor if the filter data change causes a formerly suppressed collision pair to be enabled.

Default: (0,0,0,0)

See also
getSimulationFilterData()

Implements physx::PxShape.

◆ setSoftBodyMaterials()

void NpShape::setSoftBodyMaterials ( PxFEMSoftBodyMaterial *const *  materials,
PxU16  materialCount 
)
virtual

Assigns FEM soft body material(s) to the shape. Will remove existing materials from the shape.

Sleeping: Does NOT wake the associated actor up automatically.

Parameters
[in]materialsList of material pointers to assign to the shape. See #PxFEMSoftBodyMaterial
[in]materialCountThe number of materials provided.
See also
PxPhysics.createFEMSoftBodyMaterial() getSoftBodyMaterials()

Implements physx::PxShape.

◆ setTorsionalPatchRadius()

void NpShape::setTorsionalPatchRadius ( PxReal  radius)
virtual

Sets torsional patch radius.

This defines the radius of the contact patch used to apply torsional friction. If the radius is 0, no torsional friction will be applied. If the radius is > 0, some torsional friction will be applied. This is proportional to the penetration depth so, if the shapes are separated or penetration is zero, no torsional friction will be applied. It is used to approximate rotational friction introduced by the compression of contacting surfaces.

Default: 0.0

Parameters
[in]radiusRange: (0, PX_MAX_F32)

Implements physx::PxShape.


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