Mesh Prims#
Utility functions to create polygonal UsdGeomMesh Prims.
See UsdGeomMesh for details.
Functions Summary#
- 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.
- Vec3fPrimvarData usdex::core::computeMeshNormals(const pxr::VtIntArray &faceVertexCounts, const pxr::VtIntArray &faceVertexIndices, const pxr::VtVec3fArray &points, const pxr::TfToken &interpolation=pxr::UsdGeomTokens->uniform, const pxr::GfVec3f &fallback=pxr::GfVec3f(0.0f, 0.0f, 1.0f))
Computes mesh normals for a given mesh topology.
- 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.
- std::vector< pxr::UsdGeomSubset > usdex::core::definePartitionedSubsets(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)
Fully partitions a geometry prim into multiple disjoint subsets.
- pxr::UsdGeomMesh usdex::core::definePolyMesh(pxr::UsdPrim parent, const std::string &name, 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 on the stage.
- 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.
- pxr::UsdGeomMesh usdex::core::definePolyMesh(pxr::UsdStagePtr stage, const pxr::SdfPath &path, 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 on the stage.
- std::vector< pxr::UsdGeomSubset > usdex::core::defineUnrestrictedSubsets(pxr::UsdGeomMesh mesh, const std::vector< pxr::TfToken > &names, const std::vector< pxr::VtIntArray > &indices, const pxr::TfToken &elementType, const pxr::TfToken &familyName)
Partially partitions a geometry prim into multiple, possibly overlapping, subsets.