7#ifndef USDGEOM_GENERATED_SUBSET_H
8#define USDGEOM_GENERATED_SUBSET_H
13#include "pxr/usd/usdGeom/api.h"
26#include "pxr/base/vt/value.h"
33#include "pxr/base/tf/type.h"
35PXR_NAMESPACE_OPEN_SCOPE
156 static const TfType &_GetStaticTfType();
158 static bool _IsTypedSchema();
162 const TfType &_GetTfType()
const override;
310 const VtIntArray &indices,
328 const VtIntArray &indices,
417 const std::vector<UsdGeomSubset> &subsets,
418 const size_t elementCount,
439 const std::vector<UsdGeomSubset> &subsets,
440 const size_t elementCount,
442 std::string *
const reason);
463 std::string *
const reason);
472 VtVec2iArray _GetIndexPairs(
const UsdTimeCode t,
bool preserveOrder)
const;
475PXR_NAMESPACE_CLOSE_SCOPE
Contains an asset path and an optional resolved path.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
std::set< TfToken, TfTokenFastArbitraryLessThan > Set
Predefined type for set of tokens, for when faster lookup is desired, without paying the memory or in...
TfType represents a dynamic runtime type.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Base class for all prims that may require rendering or visualization of some sort.
Encodes a subset of a piece of geometry (i.e.
static USDGEOM_API std::vector< UsdGeomSubset > GetAllGeomSubsets(const UsdGeomImageable &geom)
Returns all the GeomSubsets defined on the given imageable, geom.
UsdGeomSubset(const UsdSchemaBase &schemaObj)
Construct a UsdGeomSubset on the prim held by schemaObj .
USDGEOM_API UsdAttribute CreateElementTypeAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetElementTypeAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
static USDGEOM_API UsdGeomSubset Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdGeomSubset holding the prim adhering to this schema at path on stage.
static USDGEOM_API bool ValidateFamily(const UsdGeomImageable &geom, const TfToken &elementType, const TfToken &familyName, std::string *const reason)
Validates whether the family of subsets identified by the given familyName and elementType on the giv...
static USDGEOM_API bool ValidateSubsets(const std::vector< UsdGeomSubset > &subsets, const size_t elementCount, const TfToken &familyType, std::string *const reason)
static USDGEOM_API UsdGeomSubset Define(const UsdStagePtr &stage, const SdfPath &path)
Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefin...
static USDGEOM_API TfToken GetFamilyType(const UsdGeomImageable &geom, const TfToken &familyName)
Returns the type of family that the GeomSubsets on the given geometric prim geom, with the given fami...
static USDGEOM_API UsdGeomSubset CreateGeomSubset(const UsdGeomImageable &geom, const TfToken &subsetName, const TfToken &elementType, const VtIntArray &indices, const TfToken &familyName=TfToken(), const TfToken &familyType=TfToken())
Creates a new GeomSubset below the given geom with the given name, subsetName, element type,...
static USDGEOM_API VtIntArray GetUnassignedIndices(const std::vector< UsdGeomSubset > &subsets, const size_t elementCount, const UsdTimeCode &time=UsdTimeCode::EarliestTime())
UsdGeomSubset(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomSubset on UsdPrim prim .
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDGEOM_API UsdAttribute GetElementTypeAttr() const
The type of element that the indices target.
static USDGEOM_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
static USDGEOM_API TfToken::Set GetAllGeomSubsetFamilyNames(const UsdGeomImageable &geom)
Returns the names of all the families of GeomSubsets defined on the given imageable,...
USDGEOM_API UsdAttribute CreateFamilyNameAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetFamilyNameAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USDGEOM_API UsdAttribute CreateIndicesAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetIndicesAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USDGEOM_API UsdGeomSubset CreateUniqueGeomSubset(const UsdGeomImageable &geom, const TfToken &subsetName, const TfToken &elementType, const VtIntArray &indices, const TfToken &familyName=TfToken(), const TfToken &familyType=TfToken())
Creates a new GeomSubset below the given imageable, geom with the given name, subsetName,...
static USDGEOM_API std::vector< UsdGeomSubset > GetGeomSubsets(const UsdGeomImageable &geom, const TfToken &elementType=TfToken(), const TfToken &familyName=TfToken())
Returns all the GeomSubsets of the given elementType belonging to the specified family,...
static USDGEOM_API VtIntArray GetUnassignedIndices(const UsdGeomImageable &geom, const TfToken &elementType, const TfToken &familyName, const UsdTimeCode &time=UsdTimeCode::EarliestTime())
Utility for getting the list of indices that are not assigned to any of the GeomSubsets in the family...
static USDGEOM_API bool SetFamilyType(const UsdGeomImageable &geom, const TfToken &familyName, const TfToken &familyType)
This method is used to encode the type of family that the GeomSubsets on the given geometric prim geo...
USDGEOM_API UsdAttribute GetIndicesAttr() const
The set of indices included in this subset.
USDGEOM_API UsdAttribute GetFamilyNameAttr() const
The name of the family of subsets that this subset belongs to.
virtual USDGEOM_API ~UsdGeomSubset()
Destructor.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
The base class for all schema types in Usd.
Singleton registry that provides access to schema type information and the prim definitions for regis...
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
static constexpr UsdTimeCode EarliestTime()
Produce a UsdTimeCode representing the lowest/earliest possible timeCode.
The base class for all typed schemas (those that can impart a typeName to a UsdPrim),...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.