![]() |
|
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. More...
#include <pickTask.h>
Public Member Functions | |
| HDX_API SdfPath | GetFullPath (const TfToken &nameInPrimOrigin=HdPrimOriginSchemaTokens->scenePath) const |
| Combines instance scene paths and prim scene path to obtain the full scene path. | |
| HDX_API HdInstancerContext | ComputeInstancerContext (const TfToken &nameInPrimOrigin=HdPrimOriginSchemaTokens->scenePath) const |
| Computes an HdInstancerContext object (equivalent to the one computed by GetScenePrimPath) from the vector of HdxInstancerContext objects. | |
Static Public Member Functions | |
| static HDX_API HdxPrimOriginInfo | FromPickHit (HdSceneIndexBaseRefPtr const &terminalSceneIndex, const HdxPickHit &hit) |
| Query terminal scene index for information about picked prim. | |
| static HDX_API HdxPrimOriginInfo | FromPickHit (HdRenderIndex *renderIndex, const HdxPickHit &hit) |
| Query terminal scene index of render index for information about picked prim. | |
| static HDX_API std::vector< HdxPrimOriginInfo > | FromPickHits (HdSceneIndexBaseRefPtr const &terminalSceneIndex, const std::vector< HdxPickHit > &hits) |
| Vectorized implementation of function to query terminal scene index for information about picked prim. | |
| static HDX_API std::vector< HdxPrimOriginInfo > | FromPickHits (HdRenderIndex *renderIndex, const std::vector< HdxPickHit > &hits) |
| Vectorized implementation of function to query terminal scene index of render index for information about picked prim. | |
Public Attributes | |
| std::vector< HdxInstancerContext > | instancerContexts |
| Information about the instancers instancing the picked object. | |
| HdContainerDataSourceHandle | primOrigin |
| The prim origin data source for the picked prim if provided by the scene index. | |
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 160 of file pickTask.h.
| HDX_API HdInstancerContext 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 |
Query terminal scene 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.
|
static |
Vectorized implementation of function to query terminal scene index for information about picked prim.
Amortizes the cost of computing the array of all instance indices and locations for instancers.
| HDX_API SdfPath 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> instancerContexts |
Information about the instancers instancing the picked object.
The outer most instancer will be first.
Definition at line 220 of file pickTask.h.
| HdContainerDataSourceHandle primOrigin |
The prim origin data source for the picked prim if provided by the scene index.
Definition at line 223 of file pickTask.h.