RavEngine
Loading...
Searching...
No Matches
physx::PxContactSet Class Reference

An array of contact points, as passed to contact modification. More...

#include <PxContactModifyCallback.h>

Collaboration diagram for physx::PxContactSet:
[legend]

Public Member Functions

PX_FORCE_INLINE const PxVec3 & getPoint (PxU32 i) const
 Get the position of a specific contact point in the set.
 
PX_FORCE_INLINE void setPoint (PxU32 i, const PxVec3 &p)
 Alter the position of a specific contact point in the set.
 
PX_FORCE_INLINE const PxVec3 & getNormal (PxU32 i) const
 Get the contact normal of a specific contact point in the set.
 
PX_FORCE_INLINE void setNormal (PxU32 i, const PxVec3 &n)
 Alter the contact normal of a specific contact point in the set.
 
PX_FORCE_INLINE PxReal getSeparation (PxU32 i) const
 Get the separation distance of a specific contact point in the set.
 
PX_FORCE_INLINE void setSeparation (PxU32 i, PxReal s)
 Alter the separation of a specific contact point in the set.
 
PX_FORCE_INLINE const PxVec3 & getTargetVelocity (PxU32 i) const
 Get the target velocity of a specific contact point in the set.
 
PX_FORCE_INLINE void setTargetVelocity (PxU32 i, const PxVec3 &v)
 Alter the target velocity of a specific contact point in the set.
 
PX_FORCE_INLINE PxU32 getInternalFaceIndex0 (PxU32 i) const
 Get the face index with respect to the first shape of the pair for a specific contact point in the set.
 
PX_FORCE_INLINE PxU32 getInternalFaceIndex1 (PxU32 i) const
 Get the face index with respect to the second shape of the pair for a specific contact point in the set.
 
PX_FORCE_INLINE PxReal getMaxImpulse (PxU32 i) const
 Get the maximum impulse for a specific contact point in the set.
 
PX_FORCE_INLINE void setMaxImpulse (PxU32 i, PxReal s)
 Alter the maximum impulse for a specific contact point in the set.
 
PX_FORCE_INLINE PxReal getRestitution (PxU32 i) const
 Get the restitution coefficient for a specific contact point in the set.
 
PX_FORCE_INLINE void setRestitution (PxU32 i, PxReal r)
 Alter the restitution coefficient for a specific contact point in the set.
 
PX_FORCE_INLINE PxReal getStaticFriction (PxU32 i) const
 Get the static friction coefficient for a specific contact point in the set.
 
PX_FORCE_INLINE void setStaticFriction (PxU32 i, PxReal f)
 Alter the static friction coefficient for a specific contact point in the set.
 
PX_FORCE_INLINE PxReal getDynamicFriction (PxU32 i) const
 Get the static friction coefficient for a specific contact point in the set.
 
PX_FORCE_INLINE void setDynamicFriction (PxU32 i, PxReal f)
 Alter the static dynamic coefficient for a specific contact point in the set.
 
PX_FORCE_INLINE void ignore (PxU32 i)
 Ignore the contact point.
 
PX_FORCE_INLINE PxU32 size () const
 The number of contact points in the set.
 
PX_FORCE_INLINE PxReal getInvMassScale0 () const
 Returns the invMassScale of body 0.
 
PX_FORCE_INLINE PxReal getInvMassScale1 () const
 Returns the invMassScale of body 1.
 
PX_FORCE_INLINE PxReal getInvInertiaScale0 () const
 Returns the invInertiaScale of body 0.
 
PX_FORCE_INLINE PxReal getInvInertiaScale1 () const
 Returns the invInertiaScale of body 1.
 
PX_FORCE_INLINE void setInvMassScale0 (const PxReal scale)
 Sets the invMassScale of body 0.
 
PX_FORCE_INLINE void setInvMassScale1 (const PxReal scale)
 Sets the invMassScale of body 1.
 
PX_FORCE_INLINE void setInvInertiaScale0 (const PxReal scale)
 Sets the invInertiaScale of body 0.
 
PX_FORCE_INLINE void setInvInertiaScale1 (const PxReal scale)
 Sets the invInertiaScale of body 1.
 

Protected Member Functions

PX_FORCE_INLINE PxContactPatch * getPatch () const
 

Protected Attributes

PxU32 mCount
 Number of contact points in the set.
 
PxModifiableContact * mContacts
 The contact points of the set.
 

Detailed Description

An array of contact points, as passed to contact modification.

The word 'set' in the name does not imply that duplicates are filtered in any way. This initial set of contacts does potentially get reduced to a smaller set before being passed to the solver.

You can use the accessors to read and write contact properties. The number of contacts is immutable, other than being able to disable contacts using ignore().

See also
PxContactModifyCallback, PxModifiableContact

Member Function Documentation

◆ getDynamicFriction()

PX_FORCE_INLINE PxReal physx::PxContactSet::getDynamicFriction ( PxU32  i) const
inline

Get the static friction coefficient for a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
Returns
The friction coefficient
See also
PxModifiableContact.dynamicFriction

◆ getInternalFaceIndex0()

PX_FORCE_INLINE PxU32 physx::PxContactSet::getInternalFaceIndex0 ( PxU32  i) const
inline

Get the face index with respect to the first shape of the pair for a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
Returns
The face index of the first shape
Note
At the moment, the first shape is never a tri-mesh, therefore this function always returns PXC_CONTACT_NO_FACE_INDEX
See also
PxModifiableContact.internalFaceIndex0

◆ getInternalFaceIndex1()

PX_FORCE_INLINE PxU32 physx::PxContactSet::getInternalFaceIndex1 ( PxU32  i) const
inline

Get the face index with respect to the second shape of the pair for a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
Returns
The face index of the second shape
See also
PxModifiableContact.internalFaceIndex1

◆ getInvInertiaScale0()

PX_FORCE_INLINE PxReal physx::PxContactSet::getInvInertiaScale0 ( ) const
inline

Returns the invInertiaScale of body 0.

A value < 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.

◆ getInvInertiaScale1()

PX_FORCE_INLINE PxReal physx::PxContactSet::getInvInertiaScale1 ( ) const
inline

Returns the invInertiaScale of body 1.

A value < 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.

◆ getInvMassScale0()

PX_FORCE_INLINE PxReal physx::PxContactSet::getInvMassScale0 ( ) const
inline

Returns the invMassScale of body 0.

A value < 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.

◆ getInvMassScale1()

PX_FORCE_INLINE PxReal physx::PxContactSet::getInvMassScale1 ( ) const
inline

Returns the invMassScale of body 1.

A value < 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.

◆ getMaxImpulse()

PX_FORCE_INLINE PxReal physx::PxContactSet::getMaxImpulse ( PxU32  i) const
inline

Get the maximum impulse for a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
Returns
The maximum impulse
See also
PxModifiableContact.maxImpulse

◆ getNormal()

PX_FORCE_INLINE const PxVec3 & physx::PxContactSet::getNormal ( PxU32  i) const
inline

Get the contact normal of a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
Returns
The requested normal in world space
See also
PxModifiableContact.normal

◆ getPoint()

PX_FORCE_INLINE const PxVec3 & physx::PxContactSet::getPoint ( PxU32  i) const
inline

Get the position of a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
Returns
Position to the requested point in world space
See also
PxModifiableContact.point

◆ getRestitution()

PX_FORCE_INLINE PxReal physx::PxContactSet::getRestitution ( PxU32  i) const
inline

Get the restitution coefficient for a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
Returns
The restitution coefficient
See also
PxModifiableContact.restitution

◆ getSeparation()

PX_FORCE_INLINE PxReal physx::PxContactSet::getSeparation ( PxU32  i) const
inline

Get the separation distance of a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
Returns
The separation. Negative implies penetration.
See also
PxModifiableContact.separation

◆ getStaticFriction()

PX_FORCE_INLINE PxReal physx::PxContactSet::getStaticFriction ( PxU32  i) const
inline

Get the static friction coefficient for a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
Returns
The friction coefficient (dimensionless)
See also
PxModifiableContact.staticFriction

◆ getTargetVelocity()

PX_FORCE_INLINE const PxVec3 & physx::PxContactSet::getTargetVelocity ( PxU32  i) const
inline

Get the target velocity of a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
Returns
The target velocity in world frame
See also
PxModifiableContact.targetVelocity

◆ ignore()

PX_FORCE_INLINE void physx::PxContactSet::ignore ( PxU32  i)
inline

Ignore the contact point.

Parameters
[in]iIndex of the point in the set

If a contact point is ignored then no force will get applied at this point. This can be used to disable collision in certain areas of a shape, for example.

◆ setDynamicFriction()

PX_FORCE_INLINE void physx::PxContactSet::setDynamicFriction ( PxU32  i,
PxReal  f 
)
inline

Alter the static dynamic coefficient for a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
[in]fThe new friction coefficient
See also
PxModifiableContact.dynamicFriction

◆ setInvInertiaScale0()

PX_FORCE_INLINE void physx::PxContactSet::setInvInertiaScale0 ( const PxReal  scale)
inline

Sets the invInertiaScale of body 0.

Parameters
[in]scaleThe new scale

This can be set to any value in the range [0, PX_MAX_F32). A value < 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.

◆ setInvInertiaScale1()

PX_FORCE_INLINE void physx::PxContactSet::setInvInertiaScale1 ( const PxReal  scale)
inline

Sets the invInertiaScale of body 1.

Parameters
[in]scaleThe new scale

This can be set to any value in the range [0, PX_MAX_F32). A value < 1.0 makes this contact treat the body as if it had larger inertia. A value of 0.f makes this contact treat the body as if it had infinite inertia. Any value > 1.f makes this contact treat the body as if it had smaller inertia.

◆ setInvMassScale0()

PX_FORCE_INLINE void physx::PxContactSet::setInvMassScale0 ( const PxReal  scale)
inline

Sets the invMassScale of body 0.

Parameters
[in]scaleThe new scale

This can be set to any value in the range [0, PX_MAX_F32). A value < 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.

◆ setInvMassScale1()

PX_FORCE_INLINE void physx::PxContactSet::setInvMassScale1 ( const PxReal  scale)
inline

Sets the invMassScale of body 1.

Parameters
[in]scaleThe new scale

This can be set to any value in the range [0, PX_MAX_F32). A value < 1.0 makes this contact treat the body as if it had larger mass. A value of 0.f makes this contact treat the body as if it had infinite mass. Any value > 1.f makes this contact treat the body as if it had smaller mass.

◆ setMaxImpulse()

PX_FORCE_INLINE void physx::PxContactSet::setMaxImpulse ( PxU32  i,
PxReal  s 
)
inline

Alter the maximum impulse for a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
[in]sThe new maximum impulse
Note
Must be nonnegative. If set to zero, the contact point will be ignored
See also
PxModifiableContact.maxImpulse, ignore()

◆ setNormal()

PX_FORCE_INLINE void physx::PxContactSet::setNormal ( PxU32  i,
const PxVec3 &  n 
)
inline

Alter the contact normal of a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
[in]nThe new normal in world space
Note
Changing the normal can cause contact points to be ignored.
See also
PxModifiableContact.normal

◆ setPoint()

PX_FORCE_INLINE void physx::PxContactSet::setPoint ( PxU32  i,
const PxVec3 &  p 
)
inline

Alter the position of a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
[in]pThe new position in world space
See also
PxModifiableContact.point

◆ setRestitution()

PX_FORCE_INLINE void physx::PxContactSet::setRestitution ( PxU32  i,
PxReal  r 
)
inline

Alter the restitution coefficient for a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
[in]rThe new restitution coefficient
Note
Valid ranges [0,1]
See also
PxModifiableContact.restitution

◆ setSeparation()

PX_FORCE_INLINE void physx::PxContactSet::setSeparation ( PxU32  i,
PxReal  s 
)
inline

Alter the separation of a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
[in]sThe new separation
See also
PxModifiableContact.separation

◆ setStaticFriction()

PX_FORCE_INLINE void physx::PxContactSet::setStaticFriction ( PxU32  i,
PxReal  f 
)
inline

Alter the static friction coefficient for a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
[in]fThe new friction coefficient (dimensionless), range [0, inf]
See also
PxModifiableContact.staticFriction

◆ setTargetVelocity()

PX_FORCE_INLINE void physx::PxContactSet::setTargetVelocity ( PxU32  i,
const PxVec3 &  v 
)
inline

Alter the target velocity of a specific contact point in the set.

Parameters
[in]iIndex of the point in the set
[in]vThe new velocity in world frame
See also
PxModifiableContact.targetVelocity

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