HDK
|
#include <pickTask.h>
Public Member Functions | |
HDX_API SdfPath | GetFullPath (const TfToken &nameInPrimOrigin=HdPrimOriginSchemaTokens->scenePath) const |
HDX_API HdInstancerContext | ComputeInstancerContext (const TfToken &nameInPrimOrigin=HdPrimOriginSchemaTokens->scenePath) const |
Static Public Member Functions | |
static HDX_API HdxPrimOriginInfo | FromPickHit (HdRenderIndex *renderIndex, const HdxPickHit &hit) |
static HDX_API std::vector < HdxPrimOriginInfo > | FromPickHits (HdRenderIndex *renderIndex, const std::vector< HdxPickHit > &hits) |
Public Attributes | |
std::vector< HdxInstancerContext > | instancerContexts |
HdContainerDataSourceHandle | primOrigin |
A helper to extract information about the picked prim that allows modern applications to identify a prim and, e.g., obtain the scene path such as the path of the corresponding UsdPrim.
Note that this helper assumes that we use scene indices and that the primOrigin data source was populated for each pickable prim in the scene index. Typically, an application will populate the scenePath in the primOrigin data source. But the design allows an application to populate the primOrigin container data source with arbitrary data that helps to give context about a prim and identify the picked prim.
Note that legacy applications using scene delegates cannot use HdxPrimOriginInfo and have to translate the scene index path to a scene path using the scene delegate API HdSceneDelegate::GetScenePrimPath and HdSceneDelegate::ConvertIndexPathToCachePath.
Definition at line 162 of file pickTask.h.
HDX_API HdInstancerContext HdxPrimOriginInfo::ComputeInstancerContext | ( | const TfToken & | nameInPrimOrigin = HdPrimOriginSchemaTokens->scenePath | ) | const |
Computes an HdInstancerContext object (equivalent to the one computed by GetScenePrimPath) from the vector of HdxInstancerContext objects. Note that while HdxInstancerContext has a wealth of data about both scene instancers and hydra-created instancers, HdInstancerContext is meant to be just a list of (scene instancer, local instance id) tuples, used by some clients (e.g. usdview) for selection processing.
|
static |
Query terminal scene index of render index for information about picked prim.
|
static |
Vectorized implementation of function to query terminal scene index of render index for information about picked prim. Amortizes the cost of computing the array of all instace indices and locations for instancers.
HDX_API SdfPath HdxPrimOriginInfo::GetFullPath | ( | const TfToken & | nameInPrimOrigin = HdPrimOriginSchemaTokens->scenePath | ) | const |
Combines instance scene paths and prim scene path to obtain the full scene path.
The scene path is extracted from the prim origin container data source by using the given key.
std::vector<HdxInstancerContext> HdxPrimOriginInfo::instancerContexts |
Information about the instancers instancing the picked object. The outer most instancer will be first.
Definition at line 204 of file pickTask.h.
HdContainerDataSourceHandle HdxPrimOriginInfo::primOrigin |
The prim origin data source for the picked prim if provided by the scene index.
Definition at line 207 of file pickTask.h.