HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdxTaskControllerSceneIndex Class Referencefinal

#include <taskControllerSceneIndex.h>

+ Inheritance diagram for HdxTaskControllerSceneIndex:

Public Types

using AovDescriptorCallback = std::function< HdAovDescriptor(const TfToken &name)>
 
- Public Types inherited from TfRefBase
typedef void(* UniqueChangedFuncPtr )(TfRefBase const *, bool)
 

Public Member Functions

HDX_API ~HdxTaskControllerSceneIndex () override
 
HDX_API HdSceneIndexPrim GetPrim (const SdfPath &primPath) const override
 
HDX_API SdfPathVector GetChildPrimPaths (const SdfPath &primPath) const override
 
HDX_API SdfPathVector GetRenderingTaskPaths () const
 
HDX_API SdfPathVector GetPickingTaskPaths () const
 
HDX_API SdfPath GetRenderBufferPath (const TfToken &aovName) const
 
HDX_API void SetCollection (const HdRprimCollection &collection)
 Set the collection to be rendered. More...
 
HDX_API void SetRenderParams (const HdxRenderTaskParams &params)
 
HDX_API void SetRenderTags (const TfTokenVector &renderTags)
 
HDX_API void SetRenderOutputs (const TfTokenVector &aovNames)
 
HDX_API void SetViewportRenderOutput (TfToken const &aovName)
 
HDX_API void SetRenderOutputSettings (TfToken const &aovName, const HdAovDescriptor &desc)
 Set custom parameters for an AOV. More...
 
HDX_API HdAovDescriptor GetRenderOutputSettings (const TfToken &aovName) const
 Get parameters for an AOV. More...
 
HDX_API void SetPresentationOutput (const TfToken &api, const VtValue &framebuffer)
 
HDX_API void SetLightingState (GlfSimpleLightingContextPtr const &src)
 
HDX_API void SetRenderBufferSize (const GfVec2i &size)
 
HDX_API void SetFraming (const CameraUtilFraming &framing)
 
HDX_API void SetOverrideWindowPolicy (const std::optional< CameraUtilConformWindowPolicy > &policy)
 
HDX_API void SetCameraPath (const SdfPath &path)
 
HDX_API void SetRenderViewport (const GfVec4d &viewport)
 
HDX_API void SetFreeCameraMatrices (const GfMatrix4d &viewMatrix, const GfMatrix4d &projectionMatrix)
 
HDX_API void SetFreeCameraClipPlanes (const std::vector< GfVec4d > &clipPlanes)
 
HDX_API void SetEnableSelection (bool enable)
 Turns the selection task on or off. More...
 
HDX_API void SetSelectionColor (const GfVec4f &color)
 Set the selection color. More...
 
HDX_API void SetSelectionLocateColor (const GfVec4f &color)
 Set the selection locate (over) color. More...
 
HDX_API void SetSelectionEnableOutline (bool enableOutline)
 
HDX_API void SetSelectionOutlineRadius (unsigned int radius)
 
HDX_API void SetEnableShadows (bool enable)
 Turns the shadow task on or off. More...
 
HDX_API void SetShadowParams (const HdxShadowTaskParams &params)
 
HDX_API void SetColorCorrectionParams (const HdxColorCorrectionTaskParams &params)
 Configure color correction by settings params. More...
 
HDX_API void SetBBoxParams (const HdxBoundingBoxTaskParams &params)
 Set the bounding box params. More...
 
HDX_API void SetEnablePresentation (bool enabled)
 
- Public Member Functions inherited from HdSceneIndexBase
HD_API HdSceneIndexBase ()
 
HD_API ~HdSceneIndexBase () override
 
HD_API void AddObserver (const HdSceneIndexObserverPtr &observer)
 
HD_API void RemoveObserver (const HdSceneIndexObserverPtr &observer)
 
HdDataSourceBaseHandle GetDataSource (const SdfPath &primPath, const HdDataSourceLocator &locator) const
 
HD_API void SystemMessage (const TfToken &messageType, const HdDataSourceBaseHandle &args)
 
HD_API std::string GetDisplayName () const
 
HD_API void SetDisplayName (const std::string &n)
 
HD_API void AddTag (const TfToken &tag)
 
HD_API void RemoveTag (const TfToken &tag)
 
HD_API bool HasTag (const TfToken &tag) const
 
HD_API TfTokenVector GetTags () const
 
- Public Member Functions inherited from TfRefBase
 TfRefBase ()
 
 TfRefBase (TfRefBase const &)
 
TfRefBaseoperator= (TfRefBase const &)
 
size_t GetCurrentCount () const
 Return the current reference count of this object. More...
 
bool IsUnique () const
 Return true if only one TfRefPtr points to this object. More...
 
void SetShouldInvokeUniqueChangedListener (bool shouldCall)
 
- Public Member Functions inherited from TfWeakBase
 TfWeakBase ()
 
 TfWeakBase (const TfWeakBase &)
 
const TfWeakBase__GetTfWeakBase__ () const
 
const TfWeakBaseoperator= (const TfWeakBase &)
 
void EnableNotification2 () const
 
TF_API void const * GetUniqueIdentifier () const
 

Static Public Member Functions

static HDX_API
HdxTaskControllerSceneIndexRefPtr 
New (const SdfPath &prefix, const TfToken &rendererPluginName, const AovDescriptorCallback &aovDescriptorCallback, bool gpuEnabled=true)
 
- Static Public Member Functions inherited from TfRefBase
static TF_API void SetUniqueChangedListener (UniqueChangedListener listener)
 

Friends

class _Observer
 

Additional Inherited Members

- Protected Member Functions inherited from HdSceneIndexBase
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)
 
- Protected Member Functions inherited from TfRefBase
virtual TF_API ~TfRefBase ()
 
- Protected Member Functions inherited from TfWeakBase
 ~TfWeakBase ()
 
TfRefPtr< Tf_Remnant_Register () const
 
template<class T >
TfRefPtr< Tf_Remnant_Register (T *tempRmnt) const
 
bool _HasRemnant () const
 

Detailed Description

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.

Member Typedef Documentation

Constructor & Destructor Documentation

HDX_API HdxTaskControllerSceneIndex::~HdxTaskControllerSceneIndex ( )
override

Member Function Documentation

HDX_API SdfPathVector HdxTaskControllerSceneIndex::GetChildPrimPaths ( const SdfPath primPath) const
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.

HDX_API HdSceneIndexPrim HdxTaskControllerSceneIndex::GetPrim ( const SdfPath primPath) const
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.

HDX_API SdfPath HdxTaskControllerSceneIndex::GetRenderBufferPath ( const TfToken aovName) const

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 HDX_API HdxTaskControllerSceneIndexRefPtr HdxTaskControllerSceneIndex::New ( const SdfPath prefix,
const TfToken rendererPluginName,
const AovDescriptorCallback aovDescriptorCallback,
bool  gpuEnabled = true 
)
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)

Set the bounding box params.


Bounding Box API

HDX_API void HdxTaskControllerSceneIndex::SetCameraPath ( const SdfPath path)

– 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

HDX_API void HdxTaskControllerSceneIndex::SetEnablePresentation ( bool  enabled)

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.

HDX_API void HdxTaskControllerSceneIndex::SetEnableSelection ( bool  enable)

Turns the selection task on or off.


Selection API

HDX_API void HdxTaskControllerSceneIndex::SetEnableShadows ( bool  enable)

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".

Parameters
srcLighting 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.

HDX_API void HdxTaskControllerSceneIndex::SetRenderBufferSize ( const GfVec2i size)

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

HDX_API void HdxTaskControllerSceneIndex::SetRenderViewport ( const GfVec4d viewport)

Set the viewport param on tasks.

Deprecated:
Use SetFraming and SetRenderBufferSize instead.
HDX_API void HdxTaskControllerSceneIndex::SetSelectionColor ( const GfVec4f color)

Set the selection color.

HDX_API void HdxTaskControllerSceneIndex::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 HdxTaskControllerSceneIndex::SetSelectionLocateColor ( const GfVec4f color)

Set the selection locate (over) color.

HDX_API void HdxTaskControllerSceneIndex::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).

HDX_API void HdxTaskControllerSceneIndex::SetShadowParams ( const HdxShadowTaskParams params)

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

HDX_API void HdxTaskControllerSceneIndex::SetViewportRenderOutput ( TfToken const &  aovName)

Set which output should be rendered to the viewport. The empty token disables viewport rendering.

Friends And Related Function Documentation

friend class _Observer
friend

Definition at line 312 of file taskControllerSceneIndex.h.


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