An array of contact points, as passed to contact modification. More...
#include <PxContactModifyCallback.h>
Public Member Functions | |
PX_FORCE_INLINE const PxVec3 & | getPoint (PxU32 i) const |
Get the position of a specific contact point in the set. More... | |
PX_FORCE_INLINE void | setPoint (PxU32 i, const PxVec3 &p) |
Alter the position of a specific contact point in the set. More... | |
PX_FORCE_INLINE const PxVec3 & | getNormal (PxU32 i) const |
Get the contact normal of a specific contact point in the set. More... | |
PX_FORCE_INLINE void | setNormal (PxU32 i, const PxVec3 &n) |
Alter the contact normal of a specific contact point in the set. More... | |
PX_FORCE_INLINE PxReal | getSeparation (PxU32 i) const |
Get the separation of a specific contact point in the set. More... | |
PX_FORCE_INLINE void | setSeparation (PxU32 i, PxReal s) |
Alter the separation of a specific contact point in the set. More... | |
PX_FORCE_INLINE const PxVec3 & | getTargetVelocity (PxU32 i) const |
Get the target velocity of a specific contact point in the set. More... | |
PX_FORCE_INLINE void | setTargetVelocity (PxU32 i, const PxVec3 &v) |
Alter the target velocity of a specific contact point in the set. More... | |
PX_FORCE_INLINE PxU32 | getInternalFaceIndex0 (PxU32 i) |
Get the face index with respect to the first shape of the pair for a specific contact point in the set. More... | |
PX_FORCE_INLINE PxU32 | getInternalFaceIndex1 (PxU32 i) |
Get the face index with respect to the second shape of the pair for a specific contact point in the set. More... | |
PX_FORCE_INLINE PxReal | getMaxImpulse (PxU32 i) const |
Get the maximum impulse for a specific contact point in the set. More... | |
PX_FORCE_INLINE void | setMaxImpulse (PxU32 i, PxReal s) |
Alter the maximum impulse for a specific contact point in the set. More... | |
PX_FORCE_INLINE void | ignore (PxU32 i) |
Ignore the contact point. More... | |
PX_FORCE_INLINE PxU32 | size () const |
The number of contact points in the set. More... | |
PX_FORCE_INLINE PxReal | getInvMassScale0 () const |
Returns the invMassScale of body 0. More... | |
PX_FORCE_INLINE PxReal | getInvMassScale1 () const |
Returns the invMassScale of body 1. More... | |
PX_FORCE_INLINE PxReal | getInvInertiaScale0 () const |
Returns the invInertiaScale of body 0. More... | |
PX_FORCE_INLINE PxReal | getInvInertiaScale1 () const |
Returns the invInertiaScale of body 1. More... | |
PX_FORCE_INLINE void | setInvMassScale0 (const PxReal scale) |
Sets the invMassScale of body 0. More... | |
PX_FORCE_INLINE void | setInvMassScale1 (const PxReal scale) |
Sets the invMassScale of body 1. More... | |
PX_FORCE_INLINE void | setInvInertiaScale0 (const PxReal scale) |
Sets the invInertiaScale of body 0. More... | |
PX_FORCE_INLINE void | setInvInertiaScale1 (const PxReal scale) |
Sets the invInertiaScale of body 1. More... | |
Protected Attributes | |
PxU32 | mCount |
Number of contact points in the set. More... | |
PxModifiableContact * | mContacts |
The contact points of the set. More... | |
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().
|
inline |
Get the face index with respect to the first shape of the pair for a specific contact point in the set.
|
inline |
Get the face index with respect to the second shape of the pair for a specific contact point in the set.
|
inline |
Returns the invInertiaScale of body 0.
The scale is defaulted to 1.0, meaning that the body's true invInertia will be used.
References PxModifyContactHeader::invInertiaScale0.
|
inline |
Returns the invInertiaScale of body 1.
The scale is defaulted to 1.0, meaning that the body's true invInertia will be used.
References PxModifyContactHeader::invInertiaScale1.
|
inline |
Returns the invMassScale of body 0.
The scale is defaulted to 1.0, meaning that the body's true mass will be used.
References PxModifyContactHeader::invMassScale0.
|
inline |
Returns the invMassScale of body 1.
The scale is defaulted to 1.0, meaning that the body's true mass will be used.
References PxModifyContactHeader::invMassScale1.
|
inline |
Get the maximum impulse for a specific contact point in the set.
The value of maxImpulse is a real value in the range [0, PX_MAX_F32]. A value of 0 will disable the contact. The applied impulse will be clamped such that it cannot exceed the max impulse.
|
inline |
Get the contact normal of a specific contact point in the set.
The contact normal points from the second shape to the first shape.
|
inline |
Get the position of a specific contact point in the set.
The contact points could be on the surface of either shape and there are currently no guarantees provided upon which shape the points lie.
|
inline |
Get the separation of a specific contact point in the set.
This value can be either positive or negative. A negative value denotes penetration whereas a positive value denotes separation.
|
inline |
Get the target velocity of a specific contact point in the set.
|
inline |
Ignore the contact point.
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.
|
inline |
Sets the invInertiaScale of body 0.
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.
References PxContactHeader::eHAS_MODIFIED_MASS_RATIOS, PxContactHeader::flags, and PxModifyContactHeader::invInertiaScale0.
|
inline |
Sets the invInertiaScale of body 1.
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.
References PxContactHeader::eHAS_MODIFIED_MASS_RATIOS, PxContactHeader::flags, and PxModifyContactHeader::invInertiaScale1.
|
inline |
Sets the invMassScale of body 0.
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.
References PxContactHeader::eHAS_MODIFIED_MASS_RATIOS, PxContactHeader::flags, and PxModifyContactHeader::invMassScale0.
|
inline |
Sets the invMassScale of body 1.
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.
References PxContactHeader::eHAS_MODIFIED_MASS_RATIOS, PxContactHeader::flags, and PxModifyContactHeader::invMassScale1.
|
inline |
Alter the maximum impulse for a specific contact point in the set.
References PxContactHeader::eHAS_MAX_IMPULSE, and PxContactHeader::flags.
|
inline |
Alter the contact normal of a specific contact point in the set.
|
inline |
Alter the position of a specific contact point in the set.
|
inline |
Alter the separation of a specific contact point in the set.
|
inline |
Alter the target velocity of a specific contact point in the set.
The user-defined target velocity is used to complement the normal and frictional response to a contact. The actual response to a contact depends on the relative velocity, bounce threshold, mass properties and material properties.
The user-defined property should be defined as a relative velocity in the space (v0 - v1), where v0 is actor[0]'s velocity and v1 is actor[1]'s velocity.
References PxContactHeader::eHAS_TARGET_VELOCITY, and PxContactHeader::flags.
|
inline |
The number of contact points in the set.
|
protected |
The contact points of the set.
|
protected |
Number of contact points in the set.