24 #ifndef USDGEOM_GENERATED_SUBSET_H
25 #define USDGEOM_GENERATED_SUBSET_H
30 #include "pxr/usd/usdGeom/api.h"
31 #include "pxr/usd/usd/typed.h"
40 #include "pxr/base/vt/value.h"
47 #include "pxr/base/tf/type.h"
49 PXR_NAMESPACE_OPEN_SCOPE
132 Get(
const UsdStagePtr &stage,
const SdfPath &path);
171 static const TfType &_GetStaticTfType();
173 static bool _IsTypedSchema();
177 const TfType &_GetTfType()
const override;
298 const VtIntArray &indices,
316 const VtIntArray &indices,
384 const std::vector<UsdGeomSubset> &subsets,
385 const size_t elementCount,
405 const std::vector<UsdGeomSubset> &subsets,
406 const size_t elementCount,
408 std::string *
const reason);
429 std::string *
const reason);
432 PXR_NAMESPACE_CLOSE_SCOPE
static USDGEOM_API VtIntArray GetUnassignedIndices(const std::vector< UsdGeomSubset > &subsets, const size_t elementCount, const UsdTimeCode &time=UsdTimeCode::EarliestTime())
Utility for getting the list of indices that are not assigned to any of the GeomSubsets in subsets at...
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, familyName on the given imageable, geom.
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 .
static constexpr UsdTimeCode EarliestTime()
Produce a UsdTimeCode representing the lowest/earliest possible timeCode.
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...
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...
UsdGeomSubset(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomSubset on UsdPrim prim .
static USDGEOM_API TfToken::Set GetAllGeomSubsetFamilyNames(const UsdGeomImageable &geom)
Returns the names of all the families of GeomSubsets defined on the given imageable, geom.
Scenegraph object for authoring and retrieving numeric, string, and array valued data, sampled over time.
USDGEOM_API UsdAttribute GetElementTypeAttr() const
The type of element that the indices target.
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
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...
virtual USDGEOM_API ~UsdGeomSubset()
Destructor.
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
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...
Represents a concrete typed schema.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
The base class for all typed schemas (those that can impart a typeName to a UsdPrim), and therefore the base class for all instantiable and "IsA" schemas.
std::vector< TfToken > TfTokenVector
Convenience types.
A path value used to locate objects in layers or scenegraphs.
static USDGEOM_API bool ValidateSubsets(const std::vector< UsdGeomSubset > &subsets, const size_t elementCount, const TfToken &familyType, std::string *const reason)
Validates the data in the given set of GeomSubsets, subsets, given the total number of elements in th...
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
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.
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
Contains an asset path and an optional resolved path.
Encodes a subset of a piece of geometry (i.e.
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 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, element type, elementType and indices.
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...
TfType represents a dynamic runtime type.
Singleton registry that provides access to schema type information and the prim definitions for regis...
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 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 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 UsdGeomSubset Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdGeomSubset holding the prim adhering to this schema at path on stage. ...
The base class for all schema types in Usd.
Base class for all prims that may require rendering or visualization of some sort.
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...
Provides a container which may hold any type, and provides introspection and iteration over array typ...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...