PxFrictionAnchorStreamIterator

Defined in include/PxContact.h

class PxFrictionAnchorStreamIterator

A class to iterate over a friction anchor stream.

Public Functions

inline PxFrictionAnchorStreamIterator(const PxU8 *contactPatches, const PxU8 *frictionPatches, PxU32 patchCount)

Constructor.

Parameters
  • contactPatches – Pointer to first patch header in contact stream containing contact patch data

  • frictionPatches – Buffer containing contact patches friction information.

  • patchCount – Number of contact patches stored in the contact stream

inline bool hasNextPatch() const

Check if there are more patches.

Returns

true if there are more patches.

inline void nextPatch()

Advance to the next patch.

inline bool hasNextFrictionAnchor() const

Check if current patch has more friction anchors.

Returns

true if there are more friction anchors in current patch.

inline void nextFrictionAnchor()

Advance to the next friction anchor in the patch.

inline const PxVec3 &getPosition() const

Get the friction anchor’s position.

Returns

The friction anchor’s position.

inline const PxVec3 &getImpulse() const

Get the friction anchor’s impulse.

Returns

The friction anchor’s impulse.

inline const PxVec3 &getNormal() const

Get the friction anchor’s normal.

Returns

The friction anchor’s normal.

inline PxReal getStaticFriction() const

Get current patch’s static friction coefficient.

Returns

The patch’s static friction coefficient.

inline PxReal getDynamicFriction() const

Get current patch’s dynamic friction coefficient.

Returns

The patch’s dynamic friction coefficient.

inline PxMaterialFlags getMaterialFlags() const

Get current patch’s combined material flags.

Returns

The patch’s combined material flags.