24 #ifndef PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_PRIMVARS_H 25 #define PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_PRIMVARS_H 27 #include "pxr/usdImaging/usdImaging/dataSourceAttribute.h" 28 #include "pxr/usdImaging/usdImaging/dataSourceStageGlobals.h" 30 #include "pxr/usd/usdGeom/primvar.h" 33 PXR_NAMESPACE_OPEN_SCOPE
47 HdDataSourceBaseHandle
Get(
const TfToken &name)
override;
67 using _NamespacedPrimvarsMap = std::map<TfToken, UsdGeomPrimvar>;
68 _NamespacedPrimvarsMap _namespacedPrimvars;
78 HD_DECLARE_DATASOURCE(UsdImagingDataSourceCustomPrimvars);
84 HdDataSourceBaseHandle
Get(
const TfToken &name)
override;
91 : primvarName(primvarName)
92 , usdAttrName(usdAttrName)
93 , interpolation(interpolation)
104 using Mappings = std::vector<Mapping>;
109 const Mappings &mappings);
112 UsdImagingDataSourceCustomPrimvars(
115 const Mappings &mappings,
126 using _CustomPrimvarsMap =
130 _CustomPrimvarsMap _customPrimvars;
133 HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceCustomPrimvars);
155 HdDataSourceBaseHandle
Get(
const TfToken & name)
override;
164 HdTokenDataSourceHandle interpolation,
165 HdTokenDataSourceHandle role);
171 HdTokenDataSourceHandle _interpolation;
172 HdTokenDataSourceHandle _role;
177 PXR_NAMESPACE_CLOSE_SCOPE
179 #endif // PXR_USD_IMAGING_USD_IMAGING_DATA_SOURCE_PRIMVARS_H virtual HdDataSourceBaseHandle Get(const TfToken &name)=0
Returns the child datasource of the given name.
Object for efficiently making repeated queries for attribute values.
A datasource representing structured (named, hierarchical) data, for example a geometric primitive or...
UsdGeomPrimvarsAPI encodes geometric "primitive variables", as UsdGeomPrimvar, which interpolate acro...
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
Token for efficient comparison, assignment, and hashing of known strings.
This class is used as a context object with global stage information, that gets passed down to dataso...
Represents a set of data source locators closed under descendancy.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
std::vector< TfToken > TfTokenVector
Convenience types.
A path value used to locate objects in layers or scenegraphs.
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
Data source representing USD primvars.
A data source representing a primvar.
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
virtual TfTokenVector GetNames()=0
Returns the list of names for which Get(...) is expected to return a non-null value.