defineNonOverlappingSubsets#

Fully qualified name: usdex::core::defineNonOverlappingSubsets

std::vector<pxr::UsdGeomSubset> usdex::core::defineNonOverlappingSubsets(
pxr::UsdGeomMesh mesh,
const std::vector<pxr::TfToken> &names,
const std::vector<pxr::VtIntArray> &indices,
const pxr::TfToken &elementType = pxr::UsdGeomTokens->face,
const pxr::TfToken &familyName = pxr::UsdShadeTokens->materialBind,
)#

Partially partitions a geometry prim into multiple disjoint subsets.

An element may appear in at most one subset in this family, and at most once within that subset. The union of all subsets need not cover the whole geometry (some elements may be unassigned). Use when subsets must not overlap but need not cover the entire geometry.

The prim must be a geometry that supports subsets (e.g. UsdGeomMesh from usdex::core::definePolyMesh). Use usdex::core::bindMaterial to bind materials to each subset.

elementType defaults to UsdGeomTokens->face. See UsdGeomSubset for details.

familyName defaults to UsdShadeTokens->materialBind. See UsdGeomSubset for details.

Parameters:
  • mesh – Mesh prim to add the subsets to

  • names – The names of the subsets (size must equal indices.size())

  • indices – Per-subset element indices; indices.size() is the number of subsets, indices[i] is the index list for subset i

  • elementType – The element type of the subsets. Valid values are UsdGeomTokens->face, UsdGeomTokens->edge, and UsdGeomTokens->point.

  • familyName – The family name of the subsets

Returns:

The subsets created