7#ifndef PXR_IMAGING_HDX_COLORIZE_SELECTION_TASK_H
8#define PXR_IMAGING_HDX_COLORIZE_SELECTION_TASK_H
12#include "pxr/imaging/hdx/api.h"
13#include "pxr/imaging/hdx/task.h"
15#include "pxr/imaging/hgi/texture.h"
17PXR_NAMESPACE_OPEN_SCOPE
26 : enableSelectionHighlight(
false)
27 , enableLocateHighlight(
false)
30 , enableOutline(
false)
33 , instanceIdBufferPath()
34 , elementIdBufferPath()
37 bool enableSelectionHighlight;
38 bool enableLocateHighlight;
42 unsigned int outlineRadius;
76 void Execute(HdTaskContext* ctx)
override;
83 HdDirtyBits* dirtyBits)
override;
88 void _ColorizeSelection();
90 GfVec4f _GetColorForMode(
int mode)
const;
94 bool _UpdateParameterBuffer();
106 struct _ParameterBuffer
111 int enableOutline = 0;
115 bool operator==(
const _ParameterBuffer& other)
const {
116 return texelSize == other.texelSize &&
117 enableOutline == other.enableOutline &&
118 radius == other.radius;
127 VtIntArray _selectionOffsets;
133 uint8_t *_outputBuffer;
134 size_t _outputBufferSize;
137 std::unique_ptr<class HdxFullscreenShader> _compositor;
139 _ParameterBuffer _parameterData;
141 bool _pipelineCreated;
155PXR_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.