Foundation
Classes
PxAllocatorCallback: Abstract base class for an application defined memory allocator that can be used by the Nv library.
PxBounds3: Class representing 3D range or axis aligned bounding box.
PxErrorCallback: User defined interface class.
PxFileBuf: Callback class for data serialization.
PxFlags: Container for bitfield flag variables associated with a specific enum type.
PxFoundation: Foundation SDK singleton class.
PxMat33T: 3x3 matrix class
PxMat34Padded: A padded version of PxMat34, to safely load its data using SIMD.
PxMat44T: 4x4 matrix class
PxPlane: Representation of a plane.
PxQuatT: This is a quaternion class.
PxStrideIterator: Iterator class for iterating over arrays of data that may be interleaved with other data.
PxTransformT: class representing a rigid euclidean transform as a quaternion and a vector
PxVec2T: 2 Element vector class.
PxVec3Padded: A padded version of PxVec3, to safely load its data using SIMD.
PxVec3T: 3 Element vector class.
PxVec4T: 4 Element vector class.
Macros
PX_COMPILE_TIME_ASSERT: General defines.
PX_DEPRECATED: Alignment macros.
PX_ENABLE_ASSERTS: Assert macro.
PX_FINAL: Final macro.
PX_FORCE_INLINE: Force inline macro.
PX_GCC_FAMILY: family shortcuts
PX_INLINE: Inline macro.
PX_LIBCPP: C++ standard library defines.
PX_NOALIAS: Noalias macro.
PX_NOINLINE: Noinline macro.
PX_OVERRIDE: Override macro.
PX_PHYSICS_VERSION: The constant PX_PHYSICS_VERSION is used when creating certain PhysX module objects.
PX_PUSH_PACK_DEFAULT: Calling convention.
PX_RESTRICT: Restrict macro.
PX_UNIX_EXPORT: DLL export macros.
PX_UNUSED_ATTRIBUTE: Unused attribute macro.
PX_VC: Compiler defines, see http://sourceforge.net/p/predef/wiki/Compilers/ .
Enumerations
PxEMPTY: enum for empty constructor tag
PxIDENTITY: enum for identity constructor flag for quaternions, transforms, and matrices
PxZERO: enum for zero constructor tag for vectors and matrices
Functions
PxAbs(float a): abs returns the absolute value of its argument.
PxAbs(double a): abs returns the absolute value of its argument.
PxAbs(int32_t a): abs returns the absolute value of its argument.
PxAcos(double f): Arccosine.
PxAcos(float f): Arccosine.
PxAsin(float f): Arcsine.
PxAsin(double f): Arcsine.
PxAssert(const char *exp, const char *file, int line, bool &ignore): Built-in assert function.
PxAtan(double a): ArcTangent.
PxAtan(float a): ArcTangent.
PxAtan2(float x, float y): Arctangent of (x/y) with correct sign.
PxAtan2(double x, double y): Arctangent of (x/y) with correct sign.
PxBounds3::PxBounds3(const PxVec3 &minimum, const PxVec3 &maximum): Construct from two bounding points.
PxBounds3::basisExtent(const PxVec3 ¢er, const PxMat33 &basis, const PxVec3 &extent): Construct from center, extent, and (not necessarily orthogonal) basis.
PxBounds3::boundsOfPoints(const PxVec3 &v0, const PxVec3 &v1): returns the AABB containing v0 and v1.
PxBounds3::centerExtents(const PxVec3 ¢er, const PxVec3 &extent): returns the AABB from center and extents vectors.
PxBounds3::closestPoint(const PxVec3 &p) const: Finds the closest point in the box to the point p.
PxBounds3::contains(const PxVec3 &v) const: indicates if these bounds contain v.
PxBounds3::empty(): Return empty bounds.
PxBounds3::fattenFast(float distance): fattens the AABB in all 3 dimensions by the given distance.
PxBounds3::fattenSafe(float distance): fattens the AABB in all 3 dimensions by the given distance.
PxBounds3::getCenter() const: returns the center of this axis aligned box.
PxBounds3::getCenter(uint32_t axis) const: get component of the box's center along a given axis
PxBounds3::getDimensions() const: returns the dimensions (width/height/depth) of this axis aligned box.
PxBounds3::getExtents() const: returns the extents, which are half of the width/height/depth.
PxBounds3::getExtents(uint32_t axis) const: get component of the box's extents along a given axis
PxBounds3::include(const PxBounds3 &b): expands the volume to include b.
PxBounds3::include(const PxVec3 &v): expands the volume to include v
PxBounds3::intersects(const PxBounds3 &b) const: indicates whether the intersection of this and b is empty or not.
PxBounds3::intersects1D(const PxBounds3 &a, uint32_t axis) const: computes the 1D-intersection between two AABBs, on a given axis.
PxBounds3::isFinite() const: checks that the AABB values are not NaN
PxBounds3::isInside(const PxBounds3 &box) const: checks a box is inside another box.
PxBounds3::isValid() const: checks that the AABB values describe a valid configuration.
PxBounds3::poseExtent(const PxTransform &pose, const PxVec3 &extent): Construct from pose and extent.
PxBounds3::scaleFast(float scale): scales the AABB.
PxBounds3::scaleSafe(float scale): scales the AABB.
PxBounds3::setEmpty(): Sets empty to true.
PxBounds3::setMaximal(): Sets the bounds to maximum size [-PX_MAX_BOUNDS_EXTENTS, PX_MAX_BOUNDS_EXTENTS].
PxBounds3::transformFast(const PxTransform &transform, const PxBounds3 &bounds): gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
PxBounds3::transformFast(const PxMat33 &matrix, const PxBounds3 &bounds): gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
PxBounds3::transformSafe(const PxMat33 &matrix, const PxBounds3 &bounds): gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
PxBounds3::transformSafe(const PxTransform &transform, const PxBounds3 &bounds): gets the transformed bounds of the passed AABB (resulting in a bigger AABB).
PxClamp(T v, T lo, T hi): Clamps v to the range [hi,lo].
PxCos(float a): Cosine of an angle ( Unit: Radians)
PxCos(double a): Cosine of an angle ( Unit: Radians)
PxCreateFoundation(physx::PxU32 version, physx::PxAllocatorCallback &allocator, physx::PxErrorCallback &errorCallback): Creates an instance of the foundation class.
PxDecFoundationRefCount(): Decrement the ref count of PxFoundation .
PxDegToRad(const PxF32 a): Converts degrees to radians.
PxGetAllocatorCallback(): Get the allocator callback.
PxGetBroadcastAllocator(bool *reportAllocationNames=NULL): Get the broadcasting allocator callback.
PxGetBroadcastError(): Get the broadcasting error callback.
PxGetErrorCallback(): Get the error callback.
PxGetFoundation(): Retrieves the Foundation SDK after it has been created.
PxGetProfilerCallback(): Get the callback that will be used for all profiling.
PxGetRotXQuat(float angle): Returns a rotation quaternion around the X axis.
PxGetRotYQuat(float angle): Returns a rotation quaternion around the Y axis.
PxGetRotZQuat(float angle): Returns a rotation quaternion around the Z axis.
PxGetWarnOnceTimeStamp(): Get the warn once timestamp.
PxIncFoundationRefCount(): Increment the ref count of PxFoundation .
PxIsFinite(double f): returns true if the passed number is a finite floating point number as opposed to INF, NAN, etc.
PxIsFinite(float f): returns true if the passed number is a finite floating point number as opposed to INF, NAN, etc.
PxIsFoundationValid(): Similar to PxGetFoundation() except it handles the case if the foundation was not created already.
PxMakeIterator(const T *ptr, PxU32 stride=sizeof(T)): Stride iterator factory function which infers the iterator type.
PxMakeIterator(T *ptr, PxU32 stride=sizeof(T)): Stride iterator factory function which infers the iterator type.
PxMarkSerializedMemory(void *ptr, PxU32 byteSize): Mark a specified amount of memory with 0xcd pattern.
PxMax(float a, float b): overload for float to use fsel on xbox
PxMax(T a, T b): The return value is the greater of the two specified values.
PxMedian3(T *elements, int32_t first, int32_t last, Predicate &compare)
PxMemCopy(void *dest, const void *src, PxU32 count): Copies the bytes of one memory block to another.
PxMemMove(void *dest, const void *src, PxU32 count): Copies the bytes of one memory block to another.
PxMemSet(void *dest, PxI32 c, PxU32 count): Sets the bytes of the provided buffer to the specified value.
PxMemZero(void *dest, PxU32 count): Sets the bytes of the provided buffer to zero.
PxMin(float a, float b): overload for float to use fsel on xbox
PxMin(T a, T b): The return value is the lesser of the two specified values.
PxPartition(T *elements, int32_t first, int32_t last, Predicate &compare)
PxQuatT::PxQuatT(const PxMat33T< Type > &m): Creates from orientation matrix.
PxRecipSqrt(double a): reciprocal square root.
PxRecipSqrt(float a): reciprocal square root.
PxSetPhysXCommonDelayLoadHook(const physx::PxDelayLoadHook *hook): Sets delay load hook instance for PhysXCommon dll.
PxSetPhysXCookingDelayLoadHook(const physx::PxDelayLoadHook *hook): Sets delay load hook instance for PhysXCooking dll.
PxSetPhysXDelayLoadHook(const physx::PxDelayLoadHook *hook): Sets delay load hook instance for PhysX dll.
PxSetProfilerCallback(physx::PxProfilerCallback *profiler): Set the callback that will be used for all profiling.
PxSetRotX(PxMat33 &m, PxReal angle): Sets a rotation matrix around the X axis.
PxSetRotY(PxMat33 &m, PxReal angle): Sets a rotation matrix around the Y axis.
PxSetRotZ(PxMat33 &m, PxReal angle): Sets a rotation matrix around the Z axis.
PxSin(float a): trigonometry all angles are in radians.
PxSin(double a): Sine of an angle ( Unit: Radians )
PxSinCos(const PxF32 a, PxF32 &sin, PxF32 &cos): compute sine and cosine at the same time
PxSinCos(const double a, double &sin, double &cos): compute sine and cosine at the same time
PxSmallSort(T *elements, int32_t first, int32_t last, Predicate &compare)
PxSort(T *elements, uint32_t count, const Predicate &compare)
PxSort(T *elements, uint32_t count, const Predicate &compare, const PxAllocator &inAllocator, const uint32_t initialStackSize=32): Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
PxSqr(const PxF32 a): square of the argument
PxSqrt(float a): Square root.
PxSqrt(double a): Square root.
PxTan(double a): Tangent of an angle.
PxTan(float a): Tangent of an angle.
operator*(const PxMat33T< Type > &a, const PxMat34T< Type > &b): Multiply a*b, a is extended.
operator+(int i, PxStrideIterator< T > it): Addition operator.
Structs
PxErrorCode: Error codes.
PxTransformPadded: A generic padded & aligned transform class.
Typedefs
Variables
Enumerations
Functions
-
inline float PxAbs(float a)
abs returns the absolute value of its argument.
-
inline double PxAbs(double a)
abs returns the absolute value of its argument.
-
inline int32_t PxAbs(int32_t a)
abs returns the absolute value of its argument.
-
inline double PxAcos(double f)
Arccosine.
Returns angle between 0 and PI in radians Unit: Radians
-
inline float PxAcos(float f)
Arccosine.
Returns angle between 0 and PI in radians Unit: Radians
-
inline float PxAsin(float f)
Arcsine.
Returns angle between -PI/2 and PI/2 in radians Unit: Radians
-
inline double PxAsin(double f)
Arcsine.
Returns angle between -PI/2 and PI/2 in radians Unit: Radians
-
void PxAssert(const char *exp, const char *file, int line, bool &ignore)
Built-in assert function.
-
inline double PxAtan(double a)
ArcTangent.
Returns angle between -PI/2 and PI/2 in radians Unit: Radians
-
inline float PxAtan(float a)
ArcTangent.
Returns angle between -PI/2 and PI/2 in radians Unit: Radians
-
inline float PxAtan2(float x, float y)
Arctangent of (x/y) with correct sign.
Returns angle between -PI and PI in radians Unit: Radians
-
inline double PxAtan2(double x, double y)
Arctangent of (x/y) with correct sign.
Returns angle between -PI and PI in radians Unit: Radians
-
inline float PxCeil(float a)
-
inline float PxCos(float a)
Cosine of an angle (Unit: Radians)
-
inline double PxCos(double a)
Cosine of an angle (Unit: Radians)
-
physx::PxFoundation *PxCreateFoundation(physx::PxU32 version, physx::PxAllocatorCallback &allocator, physx::PxErrorCallback &errorCallback)
Creates an instance of the foundation class.
The foundation class is needed to initialize higher level SDKs. There may be only one instance per process. Calling this method after an instance has been created already will result in an error message and NULL will be returned.
See also
- Parameters
version – Version number we are expecting (should be PX_PHYSICS_VERSION)
allocator – User supplied interface for allocating memory(see PxAllocatorCallback)
errorCallback – User supplied interface for reporting errors and displaying messages(see PxErrorCallback)
- Returns
Foundation instance on success, NULL if operation failed
-
void PxDecFoundationRefCount()
Decrement the ref count of PxFoundation.
-
inline bool PxEquals(float a, float b, float eps)
-
inline float PxExp(float a)
-
inline float PxFloor(float a)
-
physx::PxAllocatorCallback *PxGetBroadcastAllocator(bool *reportAllocationNames = NULL)
Get the broadcasting allocator callback.
-
physx::PxFoundation &PxGetFoundation()
Retrieves the Foundation SDK after it has been created.
See also
Note
The behavior of this method is undefined if the foundation instance has not been created already.
-
physx::PxProfilerCallback *PxGetProfilerCallback()
Get the callback that will be used for all profiling.
-
inline PxQuat PxGetRotXQuat(float angle)
Returns a rotation quaternion around the X axis.
- Parameters
angle – [in] desired angle
- Returns
Quaternion that rotates around the desired axis
-
inline PxQuat PxGetRotYQuat(float angle)
Returns a rotation quaternion around the Y axis.
- Parameters
angle – [in] desired angle
- Returns
Quaternion that rotates around the desired axis
-
inline PxQuat PxGetRotZQuat(float angle)
Returns a rotation quaternion around the Z axis.
- Parameters
angle – [in] desired angle
- Returns
Quaternion that rotates around the desired axis
-
void PxIncFoundationRefCount()
Increment the ref count of PxFoundation.
-
inline bool PxIsFinite(double f)
returns true if the passed number is a finite floating point number as opposed to INF, NAN, etc.
-
inline bool PxIsFinite(float f)
returns true if the passed number is a finite floating point number as opposed to INF, NAN, etc.
-
physx::PxFoundation *PxIsFoundationValid()
Similar to PxGetFoundation() except it handles the case if the foundation was not created already.
See also
- Returns
Pointer to the foundation if an instance is currently available, otherwise null.
-
inline float PxLog(float x)
-
template<typename T>
inline PxStrideIterator<const T> PxMakeIterator(const T *ptr, PxU32 stride = sizeof(T)) Stride iterator factory function which infers the iterator type.
-
template<typename T>
inline PxStrideIterator<T> PxMakeIterator(T *ptr, PxU32 stride = sizeof(T)) Stride iterator factory function which infers the iterator type.
-
inline void PxMarkSerializedMemory(void *ptr, PxU32 byteSize)
Mark a specified amount of memory with 0xcd pattern.
This is used to check that the meta data definition for serialized classes is complete in checked builds.
- Parameters
ptr – [out] Pointer to block of memory to initialize.
byteSize – [in] Number of bytes to initialize.
-
template<>
inline float PxMax(float a, float b) overload for float to use fsel on xbox
-
template<class T>
inline T PxMax(T a, T b) The return value is the greater of the two specified values.
-
template<class T, class Predicate>
inline void PxMedian3(T *elements, int32_t first, int32_t last, Predicate &compare)
-
inline void *PxMemCopy(void *dest, const void *src, PxU32 count)
Copies the bytes of one memory block to another.
The memory blocks must not overlap.
Note
Use PxMemMove if memory blocks overlap.
- Parameters
dest – [out] Pointer to block of memory to copy to.
src – [in] Pointer to block of memory to copy from.
count – [in] Number of bytes to copy.
- Returns
Pointer to destination memory block
-
inline void *PxMemMove(void *dest, const void *src, PxU32 count)
Copies the bytes of one memory block to another.
The memory blocks can overlap.
Note
Use PxMemCopy if memory blocks do not overlap.
- Parameters
dest – [out] Pointer to block of memory to copy to.
src – [in] Pointer to block of memory to copy from.
count – [in] Number of bytes to copy.
- Returns
Pointer to destination memory block
-
inline void *PxMemSet(void *dest, PxI32 c, PxU32 count)
Sets the bytes of the provided buffer to the specified value.
- Parameters
dest – [out] Pointer to block of memory to set to the specified value.
c – [in] Value to set the bytes of the block of memory to.
count – [in] Number of bytes to set to the specified value.
- Returns
Pointer to memory block (same as input)
-
inline void *PxMemZero(void *dest, PxU32 count)
Sets the bytes of the provided buffer to zero.
- Parameters
dest – [out] Pointer to block of memory to set zero.
count – [in] Number of bytes to set to zero.
- Returns
Pointer to memory block (same as input)
-
template<>
inline float PxMin(float a, float b) overload for float to use fsel on xbox
-
template<class T>
inline T PxMin(T a, T b) The return value is the lesser of the two specified values.
-
template<class T, class Predicate>
inline int32_t PxPartition(T *elements, int32_t first, int32_t last, Predicate &compare)
-
inline float PxPow(float x, float y)
-
inline double PxRecipSqrt(double a)
reciprocal square root.
-
inline float PxRecipSqrt(float a)
reciprocal square root.
-
void PxSetPhysXCommonDelayLoadHook(const physx::PxDelayLoadHook *hook)
Sets delay load hook instance for PhysXCommon dll.
See also
- Parameters
hook – [in] Delay load hook.
-
void PxSetPhysXCookingDelayLoadHook(const physx::PxDelayLoadHook *hook)
Sets delay load hook instance for PhysXCooking dll.
See also
- Parameters
hook – [in] Delay load hook.
-
void PxSetPhysXDelayLoadHook(const physx::PxDelayLoadHook *hook)
Sets delay load hook instance for PhysX dll.
See also
- Parameters
hook – [in] Delay load hook.
-
void PxSetProfilerCallback(physx::PxProfilerCallback *profiler)
Set the callback that will be used for all profiling.
-
inline void PxSetRotX(PxMat33 &m, PxReal angle)
Sets a rotation matrix around the X axis.
- Parameters
m – [out] output rotation matrix
angle – [in] desired angle
-
inline void PxSetRotY(PxMat33 &m, PxReal angle)
Sets a rotation matrix around the Y axis.
- Parameters
m – [out] output rotation matrix
angle – [in] desired angle
-
inline void PxSetRotZ(PxMat33 &m, PxReal angle)
Sets a rotation matrix around the Z axis.
- Parameters
m – [out] output rotation matrix
angle – [in] desired angle
-
inline float PxSign(float a)
-
inline float PxSign2(float a, float eps = FLT_EPSILON)
-
inline float PxSin(float a)
trigonometry — all angles are in radians.
Sine of an angle ( Unit: Radians )
-
inline double PxSin(double a)
Sine of an angle ( Unit: Radians )
-
inline void PxSinCos(const PxF32 a, PxF32 &sin, PxF32 &cos)
compute sine and cosine at the same time
-
inline void PxSinCos(const double a, double &sin, double &cos)
compute sine and cosine at the same time
-
template<class T, class Predicate>
inline void PxSmallSort(T *elements, int32_t first, int32_t last, Predicate &compare)
-
template<class T, class Predicate>
void PxSort(T *elements, uint32_t count, const Predicate &compare)
-
template<class T, class Predicate, class PxAllocator>
void PxSort(T *elements, uint32_t count, const Predicate &compare, const PxAllocator &inAllocator, const uint32_t initialStackSize = 32) Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
-
inline float PxSqrt(float a)
Square root.
-
inline double PxSqrt(double a)
Square root.
-
inline double PxTan(double a)
Tangent of an angle.
Unit: Radians
-
inline float PxTan(float a)
Tangent of an angle.
Unit: Radians
-
template<class Type>
inline PxMat34T<Type> operator*(const PxMat33T<Type> &a, const PxMat34T<Type> &b) Multiply a*b, a is extended.
-
template<typename T>
inline PxStrideIterator<T> operator+(int i, PxStrideIterator<T> it) Addition operator.
Typedefs
-
typedef PxBitAndDataT<PxU8, 0x80> PxBitAndByte
-
typedef PxBitAndDataT<PxU32, 0x80000000> PxBitAndDword
-
typedef PxBitAndDataT<PxU16, 0x8000> PxBitAndWord
-
typedef float PxF32
-
typedef double PxF64
-
typedef int16_t PxI16
-
typedef int32_t PxI32
-
typedef int64_t PxI64
-
typedef int8_t PxI8
-
typedef float PxReal
-
typedef PxTransformT<float> PxTransform
-
typedef PxTransformPadded PxTransform32
-
typedef PxTransformT<double> PxTransformd
-
typedef uint16_t PxU16
-
typedef uint32_t PxU32
files to always include
-
typedef uint64_t PxU64
-
typedef uint8_t PxU8
-
typedef PxVec3Padded PxVec3p
Variables
-
static const float PxHalfPi = float(1.57079632679489661923)
-
static const float PxInvPi = float(0.31830988618379067154)
-
static const float PxInvSqrt2 = float(0.7071067811865476)
-
static const float PxInvTwoPi = float(0.15915494309189533577)
-
static const float PxPi = float(3.141592653589793)
-
static const float PxPiDivFour = float(0.78539816339744830962)
-
static const float PxPiDivTwo = float(1.57079632679489661923)
-
static const float PxSqrt2 = float(1.4142135623730951)
-
static const float PxTwoPi = float(6.28318530717958647692)