HdxPickTask Class Reference

A task for running picking queries against the current scene. More...

Inherits HdTask.

Public Member Functions

HDX_API HdxPickTask (HdSceneDelegate *delegate, SdfPath const &id)
 
HDX_API void Sync (HdSceneDelegate *delegate, HdTaskContext *ctx, HdDirtyBits *dirtyBits) override
 Sync the render pass resources. More...
 
HDX_API void Prepare (HdTaskContext *ctx, HdRenderIndex *renderIndex) override
 Prepare the pick task. More...
 
HDX_API void Execute (HdTaskContext *ctx) override
 Execute the pick task. More...
 
HDX_API const TfTokenVectorGetRenderTags () const override
 

Static Public Member Functions

static int DecodeIDRenderColor (unsigned char const idColor[4])
 Utility: Given a UNorm8Vec4 pixel, unpack it into an int32 ID. More...
 

Detailed Description

A task for running picking queries against the current scene.

This task generates an id buffer for a "pick frustum" (normally the camera frustum with the near plane narrowed to an (x,y) location and a pick radius); then it resolves that id buffer into a series of prim paths. The "Hit" output also contains subprim picking results (e.g. picked face, edge, point, instance) and the intersection point in scene worldspace.

HdxPickTask takes an HdxPickTaskParams through the scene delegate, and HdxPickTaskContextParams through the task context as "pickParams". It produces a hit vector, in the task context as "pickHits".

Definition at line 273 of file pickTask.h.

Member Function Documentation

◆ DecodeIDRenderColor()

static int DecodeIDRenderColor ( unsigned char const  idColor[4])
inlinestatic

Utility: Given a UNorm8Vec4 pixel, unpack it into an int32 ID.

Definition at line 301 of file pickTask.h.

◆ Execute()

HDX_API void Execute ( HdTaskContext *  ctx)
override

Execute the pick task.

◆ Prepare()

HDX_API void Prepare ( HdTaskContext *  ctx,
HdRenderIndex renderIndex 
)
override

Prepare the pick task.

◆ Sync()

HDX_API void Sync ( HdSceneDelegate delegate,
HdTaskContext *  ctx,
HdDirtyBits *  dirtyBits 
)
override

Sync the render pass resources.


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