Loading...
Searching...
No Matches
HdxPrimOriginInfo Struct Reference

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.
 

Static Public Member Functions

static HDX_API HdxPrimOriginInfo FromPickHit (HdRenderIndex *renderIndex, const HdxPickHit &hit)
 Query terminal scene index of render index for information about picked prim.
 

Public Attributes

std::vector< HdxInstancerContextinstancerContexts
 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.
 

Detailed Description

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 178 of file pickTask.h.

Member Function Documentation

◆ FromPickHit()

static HDX_API HdxPrimOriginInfo FromPickHit ( HdRenderIndex renderIndex,
const HdxPickHit hit 
)
static

Query terminal scene index of render index for information about picked prim.

◆ GetFullPath()

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.

Member Data Documentation

◆ instancerContexts

std::vector<HdxInstancerContext> instancerContexts

Information about the instancers instancing the picked object.

The outer most instancer will be first.

Definition at line 200 of file pickTask.h.

◆ primOrigin

HdContainerDataSourceHandle primOrigin

The prim origin data source for the picked prim if provided by the scene index.

Definition at line 203 of file pickTask.h.


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