HDK
|
#include <taskControllerSceneIndex.h>
Public Types | |
using | AovDescriptorCallback = std::function< HdAovDescriptor(const TfToken &name)> |
![]() | |
typedef void(* | UniqueChangedFuncPtr )(TfRefBase const *, bool) |
Static Public Member Functions | |
static HDX_API HdxTaskControllerSceneIndexRefPtr | New (const SdfPath &prefix, const TfToken &rendererPluginName, const AovDescriptorCallback &aovDescriptorCallback, bool gpuEnabled=true) |
![]() | |
static TF_API void | SetUniqueChangedListener (UniqueChangedListener listener) |
Friends | |
class | _Observer |
Additional Inherited Members | |
![]() | |
HD_API void | _SendPrimsAdded (const HdSceneIndexObserver::AddedPrimEntries &entries) |
HD_API void | _SendPrimsRemoved (const HdSceneIndexObserver::RemovedPrimEntries &entries) |
HD_API void | _SendPrimsDirtied (const HdSceneIndexObserver::DirtiedPrimEntries &entries) |
HD_API void | _SendPrimsRenamed (const HdSceneIndexObserver::RenamedPrimEntries &entries) |
HD_API bool | _IsObserved () const |
virtual HD_API void | _SystemMessage (const TfToken &messageType, const HdDataSourceBaseHandle &args) |
![]() | |
virtual TF_API | ~TfRefBase () |
![]() | |
~TfWeakBase () | |
TfRefPtr< Tf_Remnant > | _Register () const |
template<class T > | |
TfRefPtr< Tf_Remnant > | _Register (T *tempRmnt) const |
bool | _HasRemnant () const |
Manages tasks necessary to render an image (or perform picking) as well as the related render buffers, lights and a free camera.
Note that the set of necessary tasks is different for Storm and other renderers. Thus, the c'tor needs to be given the renderer plugin name.
It is a Hydra 2.0 implementation replacing of HdxTaskController. For now, the API and the behavior is the same than that of the HdxTaskController.
Definition at line 51 of file taskControllerSceneIndex.h.
using HdxTaskControllerSceneIndex::AovDescriptorCallback = std::function<HdAovDescriptor(const TfToken &name)> |
Definition at line 55 of file taskControllerSceneIndex.h.
|
override |
|
overridevirtual |
Returns the paths of all scene index prims located immediately below primPath
. This function can be used to traverse the scene by recursing from SdfPath::AbsoluteRootPath()
; such a traversal is expected to give the same set of prims as the flattening of the scene index's PrimsAdded
and PrimsRemoved
messages. This function is expected to be threadsafe.
Implements HdSceneIndexBase.
HDX_API SdfPathVector HdxTaskControllerSceneIndex::GetPickingTaskPaths | ( | ) | const |
Obtain paths to tasks managed by the task controller, for picking.
|
overridevirtual |
Returns a pair of (prim type, datasource) for the object at primPath
. If no such object exists, the type will be the empty token and the datasource will be null. This function is expected to be threadsafe.
Implements HdSceneIndexBase.
Get the path to the buffer for a rendered output. Note: the caller should call Resolve(), as HdxTaskController doesn't guarantee the buffer will be resolved.
HDX_API SdfPathVector HdxTaskControllerSceneIndex::GetRenderingTaskPaths | ( | ) | const |
Execution API Obtain paths to the tasks managed by the task controller, for image generation. The tasks returned will be different based on current renderer state.
HDX_API HdAovDescriptor HdxTaskControllerSceneIndex::GetRenderOutputSettings | ( | const TfToken & | aovName | ) | const |
Get parameters for an AOV.
|
static |
C'tor.
All prims in this scene index are under prefix. The client needs to wrap HdRenderDelegate::GetDefaultAovDescriptor in aovDescriptorCallback (the API on HdRenderDelegate might change). gpuEnabled decides whether the present task is run for non-Storm renderers.
HDX_API void HdxTaskControllerSceneIndex::SetBBoxParams | ( | const HdxBoundingBoxTaskParams & | params | ) |
– Scene camera – Set the camera param on tasks to a USD camera path.
HDX_API void HdxTaskControllerSceneIndex::SetCollection | ( | const HdRprimCollection & | collection | ) |
Set the collection to be rendered.
Rendering API
HDX_API void HdxTaskControllerSceneIndex::SetColorCorrectionParams | ( | const HdxColorCorrectionTaskParams & | params | ) |
Configure color correction by settings params.
Color Correction API
Present API Enable / disable presenting the render to bound framebuffer. An application may choose to manage the AOVs that are rendered into itself and skip the task controller's presentation.
Turns the selection task on or off.
Selection API
Turns the shadow task on or off.
Shadow API
HDX_API void HdxTaskControllerSceneIndex::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 HdxTaskControllerSceneIndex::SetFreeCameraClipPlanes | ( | const std::vector< GfVec4d > & | clipPlanes | ) |
Set the free camera clip planes. (Note: Scene cameras use clipping planes authored on the camera prim)
HDX_API void HdxTaskControllerSceneIndex::SetFreeCameraMatrices | ( | const GfMatrix4d & | viewMatrix, |
const GfMatrix4d & | 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.
HDX_API void HdxTaskControllerSceneIndex::SetLightingState | ( | GlfSimpleLightingContextPtr const & | src | ) |
Lighting API Set the lighting state for the scene. HdxTaskControllerSceneIndex maintains a set of light sprims with data set from the lights in "src".
src | Lighting state to implement. |
HDX_API void HdxTaskControllerSceneIndex::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 HdxTaskControllerSceneIndex::SetPresentationOutput | ( | const TfToken & | api, |
const VtValue & | 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.
Camera and Framing API Set the size of the render buffers backing the AOVs. GUI applications should set this to the size of the window.
HDX_API void HdxTaskControllerSceneIndex::SetRenderOutputs | ( | const TfTokenVector & | aovNames | ) |
AOV API Set the list of outputs to be rendered. If outputs.size() == 1, this will send that output to the viewport via a colorizer task. Note: names should come from HdAovTokens.
HDX_API void HdxTaskControllerSceneIndex::SetRenderOutputSettings | ( | TfToken const & | aovName, |
const HdAovDescriptor & | desc | ||
) |
Set custom parameters for an AOV.
HDX_API void HdxTaskControllerSceneIndex::SetRenderParams | ( | const HdxRenderTaskParams & | params | ) |
Set the render params. Note: params.viewport will be overwritten, since it comes from SetRenderViewport. XXX: For GL renders, HdxTaskControllerSceneIndex relies on the caller to correctly set GL_SAMPLE_ALPHA_TO_COVERAGE.
HDX_API void HdxTaskControllerSceneIndex::SetRenderTags | ( | const TfTokenVector & | 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
Set the viewport param on tasks.
Set the selection color.
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.
Set the selection locate (over) color.
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).
HDX_API void HdxTaskControllerSceneIndex::SetShadowParams | ( | const HdxShadowTaskParams & | params | ) |
Set the shadow params. Note: params.camera will be overwritten, since it comes from SetCameraPath/SetCameraState.
Set which output should be rendered to the viewport. The empty token disables viewport rendering.
|
friend |
Definition at line 312 of file taskControllerSceneIndex.h.