UsdImagingDataSourceGprim Class Reference

Data source representing a USD gprim. More...

+ Inheritance diagram for UsdImagingDataSourceGprim:

Public Member Functions

 HD_DECLARE_DATASOURCE (UsdImagingDataSourceGprim)
 
bool Has (const TfToken &name) override
 Returns whether or not this data source can return a meaningful data source for name. More...
 
TfTokenVector GetNames () override
 Returns the names for which this data source can return meaningful results. More...
 
HdDataSourceBaseHandle Get (const TfToken &name) override
 Returns the data source representing name, if valid. More...
 
- Public Member Functions inherited from UsdImagingDataSourcePrim
 HD_DECLARE_DATASOURCE (UsdImagingDataSourcePrim)
 
USDIMAGING_API bool Has (const TfToken &name) override
 Returns whether or not this data source can return a meaningful data source for name. More...
 
USDIMAGING_API TfTokenVector GetNames () override
 Returns the names for which this data source can return meaningful results. More...
 
USDIMAGING_API HdDataSourceBaseHandle Get (const TfToken &name) override
 Returns the data source representing name, if valid. More...
 
- Public Member Functions inherited from HdContainerDataSource
 HD_DECLARE_DATASOURCE_ABSTRACT (HdContainerDataSource)
 

Protected Member Functions

 UsdImagingDataSourceGprim (const SdfPath &sceneIndexPath, UsdPrim usdPrim, const UsdImagingDataSourceStageGlobals &stageGlobals)
 Use to construct a new UsdImagingDataSourceGprim. More...
 
void _AddCustomPrimvar (const TfToken &primvarName, const TfToken &attrName)
 Used by derived classes to add primvars not in the primvars: namespace, e.g. More...
 
- Protected Member Functions inherited from UsdImagingDataSourcePrim
USDIMAGING_API UsdImagingDataSourcePrim (const SdfPath &sceneIndexPath, UsdPrim usdPrim, const UsdImagingDataSourceStageGlobals &stageGlobals)
 Use to construct a new UsdImagingDataSourcePrim. More...
 
const SdfPath_GetSceneIndexPath () const
 
const UsdPrim_GetUsdPrim () const
 
const UsdImagingDataSourceStageGlobals_GetStageGlobals () const
 

Additional Inherited Members

- Static Public Member Functions inherited from UsdImagingDataSourcePrim
static USDIMAGING_API HdDataSourceLocatorSet Invalidate (const TfToken &subprim, const TfTokenVector &properties)
 Returns the hydra attribute set we should invalidate if the value of the USD properties in properties change. More...
 
- 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. More...
 

Detailed Description

Data source representing a USD gprim.

This is the common base for geometric types and includes features such as materials and primvars.

Definition at line 42 of file dataSourceGprim.h.

Constructor & Destructor Documentation

◆ UsdImagingDataSourceGprim()

UsdImagingDataSourceGprim ( const SdfPath sceneIndexPath,
UsdPrim  usdPrim,
const UsdImagingDataSourceStageGlobals stageGlobals 
)
protected

Use to construct a new UsdImagingDataSourceGprim.

sceneIndexPath is the path of this object in the scene index.

usdPrim is the USD prim object that this data source represents.

stageGlobals represents the context object for the UsdStage with which to evaluate this attribute data source.

Note: client code calls this via static New.

Member Function Documentation

◆ _AddCustomPrimvar()

void _AddCustomPrimvar ( const TfToken primvarName,
const TfToken attrName 
)
protected

Used by derived classes to add primvars not in the primvars: namespace, e.g.

"points" and "normals". Interpolation is taken from metadata, or hardcoded to "vertex" for points. Note that this needs to be called before Get("primvars") in order to take effect.

primvarName the name of the primvar in the scene index representation

attrName the name of a USD attribute to supply data for the primvar; data will come from _GetUsdPrim().GetAttribute(attrName);

◆ Get()

HdDataSourceBaseHandle Get ( const TfToken name)
overridevirtual

Returns the data source representing name, if valid.

Implements HdContainerDataSource.

Reimplemented in UsdImagingDataSourceMeshPrim, and UsdImagingDataSourceVolumePrim.

◆ GetNames()

TfTokenVector GetNames ( )
overridevirtual

Returns the names for which this data source can return meaningful results.

Implements HdContainerDataSource.

Reimplemented in UsdImagingDataSourceMeshPrim, and UsdImagingDataSourceVolumePrim.

◆ Has()

bool Has ( const TfToken name)
overridevirtual

Returns whether or not this data source can return a meaningful data source for name.

Implements HdContainerDataSource.

Reimplemented in UsdImagingDataSourceMeshPrim, and UsdImagingDataSourceVolumePrim.


The documentation for this class was generated from the following file: