Loading...
Searching...
No Matches
HdxTaskController Class Referencefinal

#include <taskController.h>

Public Member Functions

HDX_API HdxTaskController (HdRenderIndex *renderIndex, SdfPath const &controllerId, bool gpuEnabled=true)
 
HdRenderIndexGetRenderIndex ()
 Return the render index this controller is bound to.
 
HdRenderIndex const * GetRenderIndex () const
 
SdfPath const & GetControllerId () const
 Return the controller's scene-graph id (prefixed to any scene graph objects it creates).
 
HDX_API SdfPathVector GetRenderingTaskPaths () const
 Obtain paths to the tasks managed by the task controller, for image generation.
 
HDX_API SdfPathVector GetPickingTaskPaths () const
 Obtain paths to tasks managed by the task controller, for picking.
 
HDX_API HdTaskSharedPtrVector GetRenderingTasks () const
 
HDX_API HdTaskSharedPtrVector GetPickingTasks () const
 
HDX_API void SetCollection (HdRprimCollection const &collection)
 Set the collection to be rendered.
 
HDX_API void SetRenderParams (HdxRenderTaskParams const &params)
 Set the render params.
 
HDX_API void SetRenderTags (TfTokenVector const &renderTags)
 Set the "view" opinion of the scenes render tags.
 
HDX_API void SetRenderOutputs (TfTokenVector const &names)
 Set the list of outputs to be rendered.
 
HDX_API void SetViewportRenderOutput (TfToken const &name)
 Set which output should be rendered to the viewport.
 
HDX_API HdRenderBufferGetRenderOutput (TfToken const &name)
 Get the buffer for a rendered output.
 
HDX_API void SetRenderOutputSettings (TfToken const &name, HdAovDescriptor const &desc)
 Set custom parameters for an AOV.
 
HDX_API HdAovDescriptor GetRenderOutputSettings (TfToken const &name) const
 Get parameters for an AOV.
 
HDX_API void SetPresentationOutput (TfToken const &api, VtValue const &framebuffer)
 The destination API (e.g., OpenGL, see hgiInterop for details) and framebuffer that the AOVs are presented into.
 
HDX_API void SetLightingState (GlfSimpleLightingContextPtr const &src)
 Set the lighting state for the scene.
 
HDX_API void SetRenderBufferSize (const GfVec2i &size)
 Set the size of the render buffers backing the AOVs.
 
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 pixels of the render buffer will be rendered into.
 
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 display window of the camera framing.
 
HDX_API void SetCameraPath (SdfPath const &id)
 – Scene camera – Set the camera param on tasks to a USD camera path.
 
HDX_API void SetRenderViewport (GfVec4d const &viewport)
 Set the viewport param on tasks.
 
HDX_API void SetFreeCameraMatrices (GfMatrix4d const &viewMatrix, GfMatrix4d const &projectionMatrix)
 – Free camera – Set the view and projection matrices for the free camera.
 
HDX_API void SetFreeCameraClipPlanes (std::vector< GfVec4d > const &clipPlanes)
 Set the free camera clip planes.
 
HDX_API SdfPath GetFreeCameraPath ()
 Get the free camera's Hydra prim path.
 
HDX_API void SetEnableSelection (bool enable)
 Turns the selection task on or off.
 
HDX_API void SetSelectionColor (GfVec4f const &color)
 Set the selection color.
 
HDX_API void SetSelectionLocateColor (GfVec4f const &color)
 Set the selection locate (over) color.
 
HDX_API void SetSelectionEnableOutline (bool enableOutline)
 Set if the selection highlight should be rendered as an outline around the selected objects or as a solid color overlaid on top of them.
 
HDX_API void SetSelectionOutlineRadius (unsigned int radius)
 Set the selection outline radius (thickness) in pixels.
 
HDX_API void SetEnableShadows (bool enable)
 Turns the shadow task on or off.
 
HDX_API void SetShadowParams (HdxShadowTaskParams const &params)
 Set the shadow params.
 
HDX_API bool IsConverged () const
 Return whether the image has converged.
 
HDX_API void SetColorCorrectionParams (HdxColorCorrectionTaskParams const &params)
 Configure color correction by settings params.
 
HDX_API void SetBBoxParams (const HdxBoundingBoxTaskParams &params)
 Set the bounding box params.
 
HDX_API void SetEnablePresentation (bool enabled)
 Enable / disable presenting the render to bound framebuffer.
 

Detailed Description

Deprecated:
Use HdxTaskControllerSceneIndex instead

Definition at line 41 of file taskController.h.

Member Function Documentation

◆ GetControllerId()

SdfPath const & GetControllerId ( ) const
inline

Return the controller's scene-graph id (prefixed to any scene graph objects it creates).

Definition at line 57 of file taskController.h.

◆ GetFreeCameraPath()

HDX_API SdfPath GetFreeCameraPath ( )

Get the free camera's Hydra prim path.

◆ GetPickingTaskPaths()

HDX_API SdfPathVector GetPickingTaskPaths ( ) const

Obtain paths to tasks managed by the task controller, for picking.

◆ GetPickingTasks()

HDX_API HdTaskSharedPtrVector GetPickingTasks ( ) const
Deprecated:
Use GetPickingTaskPaths

Deprecated in preparation of changing to an HdxTaskControllerSceneIndex.

◆ GetRenderIndex() [1/2]

HdRenderIndex * GetRenderIndex ( )
inline

Return the render index this controller is bound to.

Definition at line 52 of file taskController.h.

◆ GetRenderIndex() [2/2]

HdRenderIndex const * GetRenderIndex ( ) const
inline

Definition at line 53 of file taskController.h.

◆ GetRenderingTaskPaths()

HDX_API SdfPathVector GetRenderingTaskPaths ( ) const

Obtain paths to the tasks managed by the task controller, for image generation.


Execution API The tasks returned will be different based on current renderer state.

◆ GetRenderingTasks()

HDX_API HdTaskSharedPtrVector GetRenderingTasks ( ) const
Deprecated:
Use GetRenderingTaskPaths

Deprecated in preparation of changing to an HdxTaskControllerSceneIndex.

◆ GetRenderOutput()

HDX_API HdRenderBuffer * GetRenderOutput ( TfToken const &  name)

Get the buffer for a rendered output.

Note: the caller should call Resolve(), as HdxTaskController doesn't guarantee the buffer will be resolved.

◆ GetRenderOutputSettings()

HDX_API HdAovDescriptor GetRenderOutputSettings ( TfToken const &  name) const

Get parameters for an AOV.

◆ IsConverged()

HDX_API bool IsConverged ( ) const

Return whether the image has converged.


Progressive Image Generation

Deprecated:

Instead, checks whether HdxTask::IsConverged for a task in the render index for each path in GetRenderingTaskPaths().

Deprecated in preparation of changing to an HdxTaskControllerSceneIndex.

◆ SetBBoxParams()

HDX_API void SetBBoxParams ( const HdxBoundingBoxTaskParams params)

Set the bounding box params.


Bounding Box API

◆ SetCameraPath()

HDX_API void SetCameraPath ( SdfPath const &  id)

– Scene camera – Set the camera param on tasks to a USD camera path.

◆ SetCollection()

HDX_API void SetCollection ( HdRprimCollection const &  collection)

Set the collection to be rendered.


Rendering API

◆ SetColorCorrectionParams()

HDX_API void SetColorCorrectionParams ( HdxColorCorrectionTaskParams const &  params)

Configure color correction by settings params.


Color Correction API

◆ SetEnablePresentation()

HDX_API void SetEnablePresentation ( bool  enabled)

Enable / disable presenting the render to bound framebuffer.


Present API An application may choose to manage the AOVs that are rendered into itself and skip the task controller's presentation.

◆ SetEnableSelection()

HDX_API void SetEnableSelection ( bool  enable)

Turns the selection task on or off.


Selection API

◆ SetEnableShadows()

HDX_API void SetEnableShadows ( bool  enable)

Turns the shadow task on or off.


Shadow API

◆ SetFraming()

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 pixels of the render buffer will be rendered into.

◆ SetFreeCameraClipPlanes()

HDX_API void SetFreeCameraClipPlanes ( std::vector< GfVec4d > const &  clipPlanes)

Set the free camera clip planes.

(Note: Scene cameras use clipping planes authored on the camera prim)

◆ SetFreeCameraMatrices()

HDX_API void SetFreeCameraMatrices ( GfMatrix4d const &  viewMatrix,
GfMatrix4d const &  projectionMatrix 
)

– Free camera – Set the view and projection matrices for the free camera.

Note: The projection matrix must be pre-adjusted for the window policy.

◆ SetLightingState()

HDX_API void SetLightingState ( GlfSimpleLightingContextPtr const &  src)

Set the lighting state for the scene.


Lighting API HdxTaskController maintains a set of light sprims with data set from the lights in "src".

Parameters
srcLighting state to implement.

◆ SetOverrideWindowPolicy()

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 display window of the camera framing.

◆ SetPresentationOutput()

HDX_API void SetPresentationOutput ( TfToken const &  api,
VtValue const &  framebuffer 
)

The destination API (e.g., OpenGL, see hgiInterop for details) and framebuffer that the AOVs are presented into.

The framebuffer is a VtValue that encoding a framebuffer in a destination API specific way. E.g., a uint32_t (aka GLuint) for framebuffer object for OpenGL.

◆ SetRenderBufferSize()

HDX_API void SetRenderBufferSize ( const GfVec2i size)

Set the size of the render buffers backing the AOVs.


Camera and Framing API GUI applications should set this to the size of the window.

◆ SetRenderOutputs()

HDX_API void SetRenderOutputs ( TfTokenVector const &  names)

Set the list of outputs to be rendered.


AOV API If outputs.size() == 1, this will send that output to the viewport via a colorizer task. Note: names should come from HdAovTokens.

◆ SetRenderOutputSettings()

HDX_API void SetRenderOutputSettings ( TfToken const &  name,
HdAovDescriptor const &  desc 
)

Set custom parameters for an AOV.

◆ SetRenderParams()

HDX_API void SetRenderParams ( HdxRenderTaskParams const &  params)

Set the render params.

Note: params.viewport will be overwritten, since it comes from SetRenderViewport. XXX: For GL renders, HdxTaskController relies on the caller to correctly set GL_SAMPLE_ALPHA_TO_COVERAGE.

◆ SetRenderTags()

HDX_API void SetRenderTags ( TfTokenVector const &  renderTags)

Set the "view" opinion of the scenes render tags.

The opinion is the base opinion for the entire scene. Individual tasks (such as the shadow task) may have a stronger opinion and override this opinion

◆ SetRenderViewport()

HDX_API void SetRenderViewport ( GfVec4d const &  viewport)

Set the viewport param on tasks.

Deprecated:
Use SetFraming and SetRenderBufferSize instead.

◆ SetSelectionColor()

HDX_API void SetSelectionColor ( GfVec4f const &  color)

Set the selection color.

◆ SetSelectionEnableOutline()

HDX_API void SetSelectionEnableOutline ( bool  enableOutline)

Set if the selection highlight should be rendered as an outline around the selected objects or as a solid color overlaid on top of them.

◆ SetSelectionLocateColor()

HDX_API void SetSelectionLocateColor ( GfVec4f const &  color)

Set the selection locate (over) color.

◆ SetSelectionOutlineRadius()

HDX_API void SetSelectionOutlineRadius ( unsigned int  radius)

Set the selection outline radius (thickness) in pixels.

This is only relevant if the highlight is meant to be rendered as an outline (if SetSelectionRenderOutline(true) is called).

◆ SetShadowParams()

HDX_API void SetShadowParams ( HdxShadowTaskParams const &  params)

Set the shadow params.

Note: params.camera will be overwritten, since it comes from SetCameraPath/SetCameraState.

◆ SetViewportRenderOutput()

HDX_API void SetViewportRenderOutput ( TfToken const &  name)

Set which output should be rendered to the viewport.

The empty token disables viewport rendering.


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