24#ifndef PXR_IMAGING_HDX_COLORIZE_SELECTION_TASK_H
25#define PXR_IMAGING_HDX_COLORIZE_SELECTION_TASK_H
29#include "pxr/imaging/hdx/api.h"
30#include "pxr/imaging/hdx/task.h"
32#include "pxr/imaging/hgi/texture.h"
34PXR_NAMESPACE_OPEN_SCOPE
43 : enableSelectionHighlight(
false)
44 , enableLocateHighlight(
false)
47 , enableOutline(
false)
50 , instanceIdBufferPath()
51 , elementIdBufferPath()
54 bool enableSelectionHighlight;
55 bool enableLocateHighlight;
59 unsigned int outlineRadius;
93 void Execute(HdTaskContext* ctx)
override;
100 HdDirtyBits* dirtyBits)
override;
105 void _ColorizeSelection();
107 GfVec4f _GetColorForMode(
int mode)
const;
111 bool _UpdateParameterBuffer();
123 struct _ParameterBuffer
128 int enableOutline = 0;
132 bool operator==(
const _ParameterBuffer& other)
const {
133 return texelSize == other.texelSize &&
134 enableOutline == other.enableOutline &&
135 radius == other.radius;
144 VtIntArray _selectionOffsets;
150 uint8_t *_outputBuffer;
151 size_t _outputBufferSize;
154 std::unique_ptr<class HdxFullscreenShader> _compositor;
156 _ParameterBuffer _parameterData;
158 bool _pipelineCreated;
172PXR_NAMESPACE_CLOSE_SCOPE
Basic type for a vector of 2 float components.
Basic type for a vector of 4 float components.
A render buffer is a handle to a data resource that can be rendered into, such as a 2d image for a dr...
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
Adapter class providing data exchange with the client scene graph.
A task for taking ID buffer data and turning it into a "selection overlay" that can be composited on ...
bool IsConverged() const override
Hooks for progressive rendering.
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 render pass resources.
HDX_API void Execute(HdTaskContext *ctx) override
Execute the task.
Base class for (some) tasks in Hdx that provides common progressive rendering and Hgi functionality.
A path value used to locate objects in layers or scenegraphs.
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
Input parameters for HdxColorizeSelectionTask.