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"
33PXR_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;
133HD_DECLARE_DATASOURCE_HANDLES(UsdImagingDataSourceCustomPrimvars);
164 HdTokenDataSourceHandle interpolation,
165 HdTokenDataSourceHandle role);
171 HdTokenDataSourceHandle _interpolation;
172 HdTokenDataSourceHandle _role;
177PXR_NAMESPACE_CLOSE_SCOPE
A datasource representing structured (named, hierarchical) data, for example a geometric primitive or...
virtual TfTokenVector GetNames()=0
Returns the list of names for which Get(...) is expected to return a non-null value.
virtual HdDataSourceBaseHandle Get(const TfToken &name)=0
Returns the child datasource of the given name.
Represents a set of data source locators closed under descendancy.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
Object for efficiently making repeated queries for attribute values.
UsdGeomPrimvarsAPI encodes geometric "primitive variables", as UsdGeomPrimvar, which interpolate acro...
A data source representing a primvar.
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
Data source representing USD primvars.
TfTokenVector GetNames() override
Returns the list of names for which Get(...) is expected to return a non-null value.
HdDataSourceBaseHandle Get(const TfToken &name) override
Returns the child datasource of the given name.
This class is used as a context object with global stage information, that gets passed down to dataso...
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
std::vector< TfToken > TfTokenVector
Convenience types.