7#ifndef PXR_IMAGING_HDX_TASK_CONTROLLER_SCENE_INDEX_H
8#define PXR_IMAGING_HDX_TASK_CONTROLLER_SCENE_INDEX_H
12#include "pxr/imaging/hdx/api.h"
13#include "pxr/imaging/hdx/boundingBoxTask.h"
14#include "pxr/imaging/hdx/colorCorrectionTask.h"
15#include "pxr/imaging/hdx/renderSetupTask.h"
16#include "pxr/imaging/hdx/shadowTask.h"
18#include "pxr/imaging/hd/aov.h"
19#include "pxr/imaging/hd/renderIndex.h"
20#include "pxr/imaging/hd/sceneIndex.h"
21#include "pxr/imaging/hd/task.h"
23#include "pxr/imaging/cameraUtil/framing.h"
28PXR_NAMESPACE_OPEN_SCOPE
31extern TfEnvSetting<int> HDX_MSAA_SAMPLE_COUNT;
54 using AovDescriptorCallback =
66 const AovDescriptorCallback aovDescriptorCallback;
74 HdxTaskControllerSceneIndexRefPtr
187 const std::optional<CameraUtilConformWindowPolicy> &policy);
275 bool _IsForStorm()
const;
276 bool _RunGpuAovTasks()
const;
278 void _CreateStormTasks();
279 void _CreateGenericTasks();
281 SdfPathVector _GetRenderingTaskPathsForStorm()
const;
282 SdfPathVector _GetRenderingTaskPathsForGenericRenderer()
const;
284 GfVec3i _RenderBufferDimensions()
const;
287 void _SetCameraFramingForTasks();
288 void _SetRenderBufferSize();
289 void _SetSimpleLightTaskParams(GlfSimpleLightingContextPtr
const& src);
290 void _SetLights(
const GlfSimpleLightVector &lights);
294 HdRetainedSceneIndexRefPtr
const _retainedSceneIndex;
297 SdfPathVector _renderTaskPaths;
306 std::optional<CameraUtilConformWindowPolicy> _overrideWindowPolicy;
310 friend class _Observer;
320 const AddedPrimEntries &entries)
override;
325 const RemovedPrimEntries &entries)
override;
330 const DirtiedPrimEntries &entries)
override;
335 const RenamedPrimEntries &entries)
override;
342PXR_NAMESPACE_CLOSE_SCOPE
Stores a 4x4 matrix of double elements.
Basic type for a vector of 2 int components.
Basic type for a vector of 3 int components.
Basic type for a vector of 4 double components.
Basic type for a vector of 4 float components.
Concrete scene container which can be externally populated and dirtied.
A named, semantic collection of objects.
Abstract interface to scene data.
Manages tasks necessary to render an image (or perform picking) as well as the related render buffers...
HDX_API void SetRenderViewport(const GfVec4d &viewport)
Set the viewport param on tasks.
HDX_API HdAovDescriptor GetRenderOutputSettings(const TfToken &aovName) const
Get parameters for an AOV.
HDX_API void SetFreeCameraClipPlanes(const std::vector< GfVec4d > &clipPlanes)
Set the free camera clip planes.
HDX_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
HDX_API void SetRenderParams(const HdxRenderTaskParams ¶ms)
Set the render params.
HDX_API void SetRenderOutputs(const TfTokenVector &aovNames)
Set the list of outputs to be rendered.
HDX_API SdfPathVector GetPickingTaskPaths() const
Obtain paths to tasks managed by the task controller, for picking.
HDX_API void SetRenderOutputSettings(TfToken const &aovName, const HdAovDescriptor &desc)
Set custom parameters for an AOV.
HDX_API void SetColorCorrectionParams(const HdxColorCorrectionTaskParams ¶ms)
Configure color correction by settings params.
HDX_API void SetOverrideWindowPolicy(const std::optional< CameraUtilConformWindowPolicy > &policy)
Specifies whether to force a window policy when conforming the frustum of the camera to match the dis...
HDX_API void SetSelectionColor(const GfVec4f &color)
Set the selection color.
HDX_API void SetLightingState(GlfSimpleLightingContextPtr const &src)
Set the lighting state for the scene.
HDX_API SdfPathVector GetRenderingTaskPaths() const
Obtain paths to the tasks managed by the task controller, for image generation.
HDX_API void SetSelectionEnableOutline(bool enableOutline)
Set if the selection highlight should be rendered as an outline around the selected objects or as a s...
HDX_API void SetCameraPath(const SdfPath &path)
– Scene camera – Set the camera param on tasks to a USD camera path.
HDX_API void SetFreeCameraMatrices(const GfMatrix4d &viewMatrix, const GfMatrix4d &projectionMatrix)
– Free camera – Set the view and projection matrices for the free camera.
HDX_API void SetViewportRenderOutput(TfToken const &aovName)
Set which output should be rendered to the viewport.
HDX_API void SetFraming(const CameraUtilFraming &framing)
Determines how the filmback of the camera is mapped into the pixels of the render buffer and what pix...
HDX_API void SetRenderTags(const TfTokenVector &renderTags)
Set the "view" opinion of the scenes render tags.
HDX_API void SetRenderBufferSize(const GfVec2i &size)
Set the size of the render buffers backing the AOVs.
HDX_API void SetCollection(const HdRprimCollection &collection)
Set the collection to be rendered.
HDX_API void SetSelectionLocateColor(const GfVec4f &color)
Set the selection locate (over) color.
HDX_API void SetSelectionOutlineRadius(unsigned int radius)
Set the selection outline radius (thickness) in pixels.
HDX_API void SetEnablePresentation(bool enabled)
Enable / disable presenting the render to bound framebuffer.
HDX_API void SetEnableShadows(bool enable)
Turns the shadow task on or off.
HDX_API void SetPresentationOutput(const TfToken &api, const VtValue &framebuffer)
The destination API (e.g., OpenGL, see hgiInterop for details) and framebuffer that the AOVs are pres...
HDX_API void SetShadowParams(const HdxShadowTaskParams ¶ms)
Set the shadow params.
HDX_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
HDX_API SdfPath GetRenderBufferPath(const TfToken &aovName) const
Get the path to the buffer for a rendered output.
HDX_API void SetBBoxParams(const HdxBoundingBoxTaskParams ¶ms)
Set the bounding box params.
HDX_API void SetEnableSelection(bool enable)
Turns the selection task on or off.
static HDX_API HdxTaskControllerSceneIndexRefPtr New(const Parameters ¶ms)
C'tor.
All prims in this scene index are under prefix.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
A bundle of state describing an AOV ("Arbitrary Output Variable") display channel.
Small struct representing a 'prim' in the Hydra scene index.
BoundingBoxTask parameters.
ColorCorrectionTask parameters.
RenderTask parameters (renderpass state).
std::vector< TfToken > TfTokenVector
Convenience types.