definePolyMesh#
Fully qualified name: usdex::core::definePolyMesh
- pxr::UsdGeomMesh usdex::core::definePolyMesh(
- pxr::UsdPrim prim,
- const pxr::VtIntArray &faceVertexCounts,
- const pxr::VtIntArray &faceVertexIndices,
- const pxr::VtVec3fArray &points,
- std::optional<const Vec3fPrimvarData> normals = std::nullopt,
- std::optional<const Vec2fPrimvarData> uvs = std::nullopt,
- std::optional<const Vec3fPrimvarData> displayColor = std::nullopt,
- std::optional<const FloatPrimvarData> displayOpacity = std::nullopt,
Defines a basic polygon mesh from an existing prim.
This converts an existing prim to a Mesh type, preserving any existing transform data.
- Parameters:
prim – The existing prim to convert to a mesh
faceVertexCounts – The number of vertices in each face of the mesh
faceVertexIndices – Indices of the positions from the
pointsto use for each face vertexpoints – Vertex positions for the mesh described in local space
normals – Values to be authored for the normals primvar
uvs – Values to be authored for the uv primvar
displayColor – Values to be authored for the display color primvar
displayOpacity – Values to be authored for the display opacity primvar
- Returns:
UsdGeomMesh schema wrapping the converted UsdPrim