PxConstraintAllocator

Defined in include/solver/PxSolverDefs.h

class PxConstraintAllocator

Public Functions

virtual PxU8 *reserveConstraintData(const PxU32 byteSize) = 0

Allocates constraint data.

It is the application’s responsibility to release this memory after PxSolveConstraints has completed.

Parameters

byteSize[in] Allocation size in bytes

Returns

The allocated memory. This address must be 16-byte aligned.

virtual PxU8 *reserveFrictionData(const PxU32 byteSize) = 0

Allocates friction data.

Friction data can be retained by the application for a given pair and provided as an input to PxSolverContactDesc to improve simulation stability. It is the application’s responsibility to release this memory. If this memory is released, the application should ensure it does not pass pointers to this memory to PxSolverContactDesc.

Parameters

byteSize[in] Allocation size in bytes

Returns

The allocated memory. This address must be 4-byte aligned.

inline virtual ~PxConstraintAllocator()