Defined in include/extensions/PxSmoothNormals.h

bool 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.

  • nbTris[in] Number of triangles

  • nbVerts[in] Number of vertices

  • verts[in] Array of vertices

  • dFaces[in] Array of dword triangle indices, or null

  • wFaces[in] Array of word triangle indices, or null

  • normals[out] Array of computed normals (assumes nbVerts vectors)

  • flip[in] Flips the normals or not


True on success.