![]() |
|
A task for running picking queries against the current scene. More...
#include <pickTask.h>
Inheritance diagram for HdxPickTask:Public Types | |
| using | TaskParams = HdxPickTaskParams |
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. | |
| HDX_API void | Prepare (HdTaskContext *ctx, HdRenderIndex *renderIndex) override |
| Prepare the pick task. | |
| HDX_API void | Execute (HdTaskContext *ctx) override |
| Execute the pick task. | |
| HDX_API const TfTokenVector & | GetRenderTags () const override |
| Render Tag Gather. | |
Public Member Functions inherited from HdTask | |
| HD_API | HdTask (SdfPath const &id) |
| Construct a new task. | |
| virtual HD_API bool | IsConverged () const |
| This function returns true when a (progressive) task considers its execution results converged. | |
| virtual void | Sync (HdSceneDelegate *delegate, HdTaskContext *ctx, HdDirtyBits *dirtyBits)=0 |
| Sync Phase: Obtain task state from Scene delegate based on change processing. | |
| virtual void | Prepare (HdTaskContext *ctx, HdRenderIndex *renderIndex)=0 |
| Prepare Phase: Resolve bindings and manage resources. | |
| virtual void | Execute (HdTaskContext *ctx)=0 |
| Execute Phase: Runs the task. | |
| virtual HD_API const TfTokenVector & | GetRenderTags () const |
| Render Tag Gather. | |
| SdfPath const & | GetId () const |
| virtual HD_API HdDirtyBits | GetInitialDirtyBitsMask () const |
| Returns the minimal set of dirty bits to place in the change tracker for use in the first sync of this prim. | |
Static Public Member Functions | |
| static int | DecodeIDRenderColor (unsigned char const idColor[4]) |
| Utility: Given a UNorm8Vec4 pixel, unpack it into an int32 ID. | |
Additional Inherited Members | |
Protected Member Functions inherited from HdTask | |
| template<class T > | |
| bool | _GetTaskParams (HdSceneDelegate *delegate, T *outValue) |
| Extracts a typed value out of the task context at the given id. | |
| HD_API TfTokenVector | _GetTaskRenderTags (HdSceneDelegate *delegate) |
Static Protected Member Functions inherited from HdTask | |
| static HD_API bool | _HasTaskContextData (HdTaskContext const *ctx, TfToken const &id) |
| Check if the shared context contains a value for the given id. | |
| template<class T > | |
| static bool | _GetTaskContextData (HdTaskContext const *ctx, TfToken const &id, T *outValue) |
| Extracts a typed value out of the task context at the given id. | |
| template<class T > | |
| static T | _GetDriver (HdTaskContext const *ctx, TfToken const &driverName) |
| Extract an object from a HdDriver inside the task context. | |
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 308 of file pickTask.h.
| using TaskParams = HdxPickTaskParams |
Definition at line 311 of file pickTask.h.
|
inlinestatic |
Utility: Given a UNorm8Vec4 pixel, unpack it into an int32 ID.
Definition at line 338 of file pickTask.h.
|
overridevirtual |
Execute the pick task.
Implements HdTask.
|
overridevirtual |
Render Tag Gather.
Is called during the Sync phase after the task has been sync'ed.
The task should return the render tags it wants to be appended to the active set.
Hydra prims are marked up with a render tag and only prims marked with the render tags in the current active set are Sync'ed.
Hydra's core will combine the sets from each task and deduplicate the result. So tasks don't need to co-ordinate with each other to optimize the set.
For those tasks that use HdRenderPass, this set is passed to HdRenderPass's Execute method.
The default implementation returns an empty set
Reimplemented from HdTask.
|
overridevirtual |
Prepare the pick task.
Implements HdTask.
|
overridevirtual |
Sync the render pass resources.
Implements HdTask.