![]() |
|
A data source that is a (potentially nested) container for the values of the attributes of a given UsdPrim. More...
#include <dataSourceMapped.h>
Inheritance diagram for UsdImagingDataSourceMapped:Classes | |
| struct | AttributeMapping |
| Specify how an attribute on the given Usd prim maps to a data source in this (nested) container data source. More... | |
| struct | PropertyMappingBase |
| Base class to specify how a property on the given Usd prim maps to a data source in this (nested) container data source. More... | |
| class | PropertyMappings |
| Specify how attributes on given Usd prim maps to data sources in this (nested) container data source. More... | |
| struct | RelationshipMapping |
| Specify how a relationship on the given Usd prim maps to a data source in this (nested) container data source. More... | |
Public Types | |
| using | DataSourceAttributeFactory = HdSampledDataSourceHandle(const UsdAttribute &, const UsdImagingDataSourceStageGlobals &, const SdfPath &, const HdDataSourceLocator &) |
| Signature of function to compute data source from attribute. | |
| using | DataSourceAttributeFactoryFn = std::function< DataSourceAttributeFactory > |
| using | DataSourceAttributeFactoryPtr = DataSourceAttributeFactory * |
| using | DataSourceRelationshipFactory = HdDataSourceBaseHandle(const UsdRelationship &, const UsdImagingDataSourceStageGlobals &, const SdfPath &, const HdDataSourceLocator &) |
| using | DataSourceRelationshipFactoryFn = std::function< DataSourceRelationshipFactory > |
| using | DataSourceRelationshipFactoryPtr = DataSourceRelationshipFactory * |
| using | PropertyMapping = std::variant< AttributeMapping, RelationshipMapping > |
Public Member Functions | |
| HD_DECLARE_DATASOURCE (UsdImagingDataSourceMapped) | |
| USDIMAGING_API TfTokenVector | GetNames () override |
Returns the list of names for which Get(...) is expected to return a non-null value. | |
| USDIMAGING_API HdDataSourceBaseHandle | Get (const TfToken &name) override |
| Returns the child datasource of the given name. | |
Public Member Functions inherited from HdContainerDataSource | |
| HD_DECLARE_DATASOURCE_ABSTRACT (HdContainerDataSource) | |
| 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. | |
Static Public Member Functions | |
| static USDIMAGING_API const DataSourceRelationshipFactoryFn & | GetPathFromRelationshipDataSourceFactory () |
| static USDIMAGING_API const DataSourceRelationshipFactoryFn & | GetPathArrayFromRelationshipDataSourceFactory () |
| static USDIMAGING_API HdDataSourceLocatorSet | Invalidate (const TfTokenVector &usdNames, const PropertyMappings &mappings) |
Static Public Member Functions inherited from HdContainerDataSource | |
| static HD_API HdDataSourceBaseHandle | Get (const Handle &container, const HdDataSourceLocator &locator) |
A convenience function: given container, return the descendant identified by locator, which may be at any depth. | |
A data source that is a (potentially nested) container for the values of the attributes of a given UsdPrim.
That is, this container data source contains HdSampledDataSources giving the value of an attribute, either directly or in a nested fashion by containing container data sources itself.
The mapping of attributes to locations in the (nested) container data source can be specified through AttributeMapping. These locations are relative to the UsdImagingDataSourceMapped itself. To compute the correct data source locators for invalidation purposes, the location of the UsdImagingDataSourceMapped needs to be given to AttributeMappings so that absolute locators (that is relative to the prim data source) can be computed.
Definition at line 43 of file dataSourceMapped.h.
| using DataSourceAttributeFactory = HdSampledDataSourceHandle(const UsdAttribute &, const UsdImagingDataSourceStageGlobals &, const SdfPath &, const HdDataSourceLocator &) |
Signature of function to compute data source from attribute.
This could be generalized to HdDataSourceBaseHandle but we use HdSampledDataSourceHandle as result instead so that we can use the UsdImagingDataSourceAttributeNew function pointer.
Definition at line 71 of file dataSourceMapped.h.
| using DataSourceAttributeFactoryFn = std::function<DataSourceAttributeFactory> |
Definition at line 76 of file dataSourceMapped.h.
| using DataSourceAttributeFactoryPtr = DataSourceAttributeFactory * |
Definition at line 78 of file dataSourceMapped.h.
| using DataSourceRelationshipFactory = HdDataSourceBaseHandle(const UsdRelationship &, const UsdImagingDataSourceStageGlobals &, const SdfPath &, const HdDataSourceLocator &) |
Definition at line 99 of file dataSourceMapped.h.
| using DataSourceRelationshipFactoryFn = std::function<DataSourceRelationshipFactory> |
Definition at line 104 of file dataSourceMapped.h.
| using DataSourceRelationshipFactoryPtr = DataSourceRelationshipFactory * |
Definition at line 106 of file dataSourceMapped.h.
| using PropertyMapping = std::variant<AttributeMapping, RelationshipMapping> |
Definition at line 127 of file dataSourceMapped.h.
|
overridevirtual |
Returns the child datasource of the given name.
This call is expected to be threadsafe.
Implements HdContainerDataSource.
|
overridevirtual |
Returns the list of names for which Get(...) is expected to return a non-null value.
This call is expected to be threadsafe.
Implements HdContainerDataSource.