Common

Classes

Macros

Functions

Structs

Typedefs

Functions

inline PxF32 PxComputeAngle(const PxVec3 &v0, const PxVec3 &v1)

Compute the angle between two non-unit vectors.

Parameters
  • v0[in] is one of the non-unit vectors

  • v1[in] is the other of the two non-unit vectors

Returns

Returns the angle (in radians) between the two vector v0 and v1.

inline void PxComputeBasisVectors(const PxVec3 &dir, PxVec3 &right, PxVec3 &up)

Compute two normalized vectors (right and up) that are perpendicular to an input normalized vector (dir).

Parameters
  • dir[in] is a normalized vector that is used to compute the perpendicular vectors.

  • right[out] is the first of the two vectors perpendicular to dir

  • up[out] is the second of the two vectors perpendicular to dir

inline void PxComputeBasisVectors(const PxVec3 &p0, const PxVec3 &p1, PxVec3 &dir, PxVec3 &right, PxVec3 &up)

Compute three normalized vectors (dir, right and up) that are parallel to (dir) and perpendicular to (right, up) the normalized direction vector (p1 - p0)/||p1 - p0||.

Parameters
  • p0[in] is used to compute the normalized vector dir = (p1 - p0)/||p1 - p0||.

  • p1[in] is used to compute the normalized vector dir = (p1 - p0)/||p1 - p0||.

  • dir[out] is the normalized vector (p1 - p0)/||p1 - p0||.

  • right[out] is the first of the two normalized vectors perpendicular to dir

  • up[out] is the second of the two normalized vectors perpendicular to dir

physx::PxCollection *PxCreateCollection()

Creates a collection object.

Objects can only be serialized or deserialized through a collection. For serialization, users must add objects to the collection and serialize the collection as a whole. For deserialization, the system gives back a collection of deserialized objects to users.

Returns

The new collection object.

PxVec3 PxDiagonalize(const PxMat33 &m, PxQuat &axes)
inline PxVec3 PxEllipseClamp(const PxVec3 &point, const PxVec3 &radii)

Compute the closest point on an 2d ellipse to a given 2d point.

Parameters
  • point[in] is a 2d point in the y-z plane represented by (point.y, point.z)

  • radii[in] are the radii of the ellipse (radii.y and radii.z) in the y-z plane.

Returns

Returns the 2d position on the surface of the ellipse that is closest to point.

inline PxQuat PxExp(const PxVec3 &v)

Compute the exponent of a PxVec3.

inline PxU32 PxGetNextIndex3(PxU32 i)

Compute (i+1)%3.

void PxIntegrateTransform(const PxTransform &curTrans, const PxVec3 &linvel, const PxVec3 &angvel, PxReal timeStep, PxTransform &result)

integrate transform.

Parameters
  • curTrans[in] The current transform

  • linvel[in] Linear velocity

  • angvel[in] Angular velocity

  • timeStep[in] The time-step for integration

  • result[out] The integrated transform

inline PxU32 PxLargestAxis(const PxVec3 &v)

return Returns 0 if v.x is largest element of v, 1 if v.y is largest element, 2 if v.z is largest element.

inline PxVec3 PxLog(const PxQuat &q)

return Returns the log of a PxQuat

PxVec3 PxOptimizeBoundingBox(PxMat33 &basis)

computes a oriented bounding box around the scaled basis.

Parameters

basis – Input = skewed basis, Output = (normalized) orthogonal basis.

Returns

Bounding box extent.

inline PxPlane PxPlaneEquationFromTransform(const PxTransform &pose)

creates a plane equation from a transform, such as the actor transform for a PxPlaneGeometry

Parameters

pose[in] the transform

Returns

the plane

inline PxReal PxSdfSample(const PxReal *sdf, const PxVec3 &localPos, const PxVec3 &sdfBoxLower, const PxVec3 &sdfBoxHigher, const PxReal sdfDx, const PxReal invSdfDx, const PxU32 dimX, const PxU32 dimY, const PxU32 dimZ, PxVec3 &gradient, PxReal tolerance = PX_MAX_F32)
inline void PxSeparateSwingTwist(const PxQuat &q, PxQuat &swing, PxQuat &twist)

Compute from an input quaternion q a pair of quaternions (swing, twist) such that q = swing * twist with the caveats that swing.x = twist.y = twist.z = 0.

Parameters
  • q[in] is the quaternion to be decomposed into swing and twist quaternions.

  • swing[out] is the swing component of the quaternion decomposition.

  • twist[out] is the twist component of the quaternion decomposition.

PxQuat PxShortestRotation(const PxVec3 &from, const PxVec3 &target)

finds the shortest rotation between two vectors.

Parameters
  • from[in] the vector to start from

  • target[in] the vector to rotate to

Returns

a rotation about an axis normal to the two vectors which takes one to the other via the shortest path

inline PxQuat PxSlerp(const PxReal t, const PxQuat &left, const PxQuat &right)

Spherical linear interpolation of two quaternions.

Parameters
  • t[in] is the interpolation parameter in range (0, 1)

  • left[in] is the start of the interpolation

  • right[in] is the end of the interpolation

Returns

Returns left when t=0, right when t=1 and a linear interpolation of left and right when 0 < t < 1. Returns angle between -PI and PI in radians

inline PxReal PxTanHalf(PxReal sin, PxReal cos)

Compute tan(theta/2) given sin(theta) and cos(theta) as inputs.

Parameters
  • sin[in] has value sin(theta)

  • cos[in] has value cos(theta)

Returns

Returns tan(theta/2)

PxTransform PxTransformFromPlaneEquation(const PxPlane &plane)

creates a transform from a plane equation, suitable for an actor transform for a PxPlaneGeometry

Parameters

plane[in] the desired plane equation

Returns

a PxTransform which will transform the plane PxPlane(1,0,0,0) to the specified plane

PxTransform PxTransformFromSegment(const PxVec3 &p0, const PxVec3 &p1, PxReal *halfHeight = NULL)

creates a transform from the endpoints of a segment, suitable for an actor transform for a PxCapsuleGeometry

Parameters
  • p0[in] one end of major axis of the capsule

  • p1[in] the other end of the axis of the capsule

  • halfHeight[out] the halfHeight of the capsule. This parameter is optional.

Returns

A PxTransform which will transform the vector (1,0,0) to the capsule axis shrunk by the halfHeight

inline void computeBarycentric(const PxVec3 &a, const PxVec3 &b, const PxVec3 &c, const PxVec3 &p, PxVec4 &bary)
inline void computeBarycentric(const PxVec3 &a, const PxVec3 &b, const PxVec3 &c, const PxVec3 &d, const PxVec3 &p, PxVec4 &bary)

Typedefs

typedef PxFlags<PxBaseFlag::Enum, PxU16> PxBaseFlags
typedef void (*PxBinaryMetaDataCallback)(PxOutputStream &stream)

Callback type for exporting binary meta data for a serializable type.

Deprecated:

Binary conversion and binary meta data are deprecated.

Param stream

Stream to store binary meta data.

typedef PxU16 PxFEMMaterialTableIndex
typedef PxU16 PxMaterialTableIndex
typedef PxU64 PxSerialObjectId

ID type for PxBase objects in a PxCollection.

typedef PxU32 PxTriangleID
typedef PxU16 PxType