computeMeshNormals#

Fully qualified name: usdex::core::computeMeshNormals

Vec3fPrimvarData usdex::core::computeMeshNormals(
pxr::UsdGeomMesh mesh,
const pxr::TfToken &interpolation = pxr::UsdGeomTokens->uniform,
const pxr::GfVec3f &fallback = pxr::GfVec3f(0.0f, 0.0f, 1.0f),
)#

Computes mesh normals and updates the mesh with the computed normals.

This is an overloaded member function, provided for convenience.

Parameters:
  • mesh – Mesh prim

  • interpolation – The desired interpolation type for the computed normals

  • fallback – The fallback normal to use for degenerate faces and vertices with no contributing faces

Returns:

Vec3fPrimvarData containing the computed normals, or an invalid one if computation fails.