RavEngine
Loading...
Searching...
No Matches
Extensions
Collaboration diagram for Extensions:

Namespaces

namespace  physx
 Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
 

Macros

#define PX_BINARY_SERIAL_VERSION   "4ACDCFBFCFC047699FFC47263E9670C0"
 

Typedefs

typedef FILE * PxFileHandle
 

Functions

PX_C_EXPORT bool PX_CALL_CONV PxInitExtensions (physx::PxPhysics &physics, physx::PxPvd *pvd)
 Initialize the PhysXExtensions library.
 
PX_C_EXPORT void PX_CALL_CONV PxCloseExtensions ()
 Shut down the PhysXExtensions library.
 
PX_C_EXPORT void PX_CALL_CONV PxSetJointGlobalFrame (physx::PxJoint &joint, const physx::PxVec3 *wsAnchor, const physx::PxVec3 *wsAxis)
 Helper function to setup a joint's global frame.
 
PX_C_EXPORT bool PX_CALL_CONV PxBuildSmoothNormals (physx::PxU32 nbTris, physx::PxU32 nbVerts, const physx::PxVec3 *verts, const physx::PxU32 *dFaces, const physx::PxU16 *wFaces, physx::PxVec3 *normals, bool flip)
 Builds smooth vertex normals over a mesh.
 

Detailed Description

Macro Definition Documentation

◆ PX_BINARY_SERIAL_VERSION

#define PX_BINARY_SERIAL_VERSION   "4ACDCFBFCFC047699FFC47263E9670C0"

PX_BINARY_SERIAL_VERSION is used to version the PhysX binary data and meta data. The global unique identifier of the PhysX SDK needs to match the one in the data and meta data, otherwise they are considered incompatible. A 32 character wide GUID can be generated with https://www.guidgenerator.com/ for example.

Function Documentation

◆ PxBuildSmoothNormals()

PX_C_EXPORT bool PX_CALL_CONV PxBuildSmoothNormals ( physx::PxU32  nbTris,
physx::PxU32  nbVerts,
const physx::PxVec3 *  verts,
const physx::PxU32 *  dFaces,
const physx::PxU16 *  wFaces,
physx::PxVec3 *  normals,
bool  flip 
)

Builds smooth vertex normals over a mesh.

  • "smooth" because smoothing groups are not supported here
  • takes angles into account for correct cube normals computation

To use 32bit indices pass a pointer in dFaces and set wFaces to zero. Alternatively pass a pointer to wFaces and set dFaces to zero.

Parameters
[in]nbTrisNumber of triangles
[in]nbVertsNumber of vertices
[in]vertsArray of vertices
[in]dFacesArray of dword triangle indices, or null
[in]wFacesArray of word triangle indices, or null
[out]normalsArray of computed normals (assumes nbVerts vectors)
[in]flipFlips the normals or not
Returns
True on success.

◆ PxCloseExtensions()

PX_C_EXPORT void PX_CALL_CONV PxCloseExtensions ( )

Shut down the PhysXExtensions library.

This function should be called to cleanly shut down the PhysXExtensions library before application exit.

Note
This function is required to be called to release foundation usage.
See also
PxInitExtensions

◆ PxInitExtensions()

PX_C_EXPORT bool PX_CALL_CONV PxInitExtensions ( physx::PxPhysics &  physics,
physx::PxPvd *  pvd 
)

Initialize the PhysXExtensions library.

This should be called before calling any functions or methods in extensions which may require allocation.

Note
This function does not need to be called before creating a PxDefaultAllocator object.
Parameters
physicsa PxPhysics object
pvdan PxPvd (PhysX Visual Debugger) object
See also
PxCloseExtensions PxFoundation PxPhysics

◆ PxSetJointGlobalFrame()

PX_C_EXPORT void PX_CALL_CONV PxSetJointGlobalFrame ( physx::PxJoint &  joint,
const physx::PxVec3 *  wsAnchor,
const physx::PxVec3 *  wsAxis 
)

Helper function to setup a joint's global frame.

This replaces the following functions from previous SDK versions:

void NxJointDesc::setGlobalAnchor(const NxVec3& wsAnchor); void NxJointDesc::setGlobalAxis(const NxVec3& wsAxis);

The function sets the joint's localPose using world-space input parameters.

Parameters
[in]wsAnchorGlobal frame anchor point. Range: position vector
[in]wsAxisGlobal frame axis. Range: direction vector
[in,out]jointJoint having its global frame set.