24 #ifndef PXR_IMAGING_HDX_TASK_CONTROLLER_H
25 #define PXR_IMAGING_HDX_TASK_CONTROLLER_H
61 bool gpuEnabled =
true);
174 const std::optional<CameraUtilConformWindowPolicy> &
policy);
271 HdxTaskController &operator=(HdxTaskController
const&) =
delete;
279 void _CreateRenderGraph();
281 void _CreateLightingTask();
282 void _CreateShadowTask();
285 void _CreateOitResolveTask();
286 void _CreateSelectionTask();
287 void _CreateColorizeSelectionTask();
288 void _CreateColorCorrectionTask();
289 void _CreateVisualizeAovTask();
290 void _CreatePickTask();
291 void _CreatePickFromRenderBufferTask();
292 void _CreateBoundingBoxTask();
293 void _CreateAovInputTask();
294 void _CreatePresentTask();
296 void _SetCameraParamForTasks(
SdfPath const&
id);
297 void _SetCameraFramingForTasks();
298 void _UpdateAovDimensions(
GfVec2i const& dimensions);
300 void _SetBlendStateForMaterialTag(
TfToken const& materialTag,
304 bool _ShadowsEnabled()
const;
305 bool _SelectionEnabled()
const;
306 bool _ColorizeSelectionEnabled()
const;
307 bool _ColorCorrectionEnabled()
const;
308 bool _VisualizeAovEnabled()
const;
309 bool _ColorizeQuantizationEnabled()
const;
310 bool _AovsSupported()
const;
311 bool _UsingAovs()
const;
319 bool _SupportBuiltInLightTypes();
320 void _SetBuiltInLightingState(GlfSimpleLightingContextPtr
const&
src);
330 void _SetMaterialNetwork(
SdfPath const& pathName,
333 void _RemoveLightSprim(
size_t const& pathIdx);
334 void _ReplaceLightSprim(
size_t const& pathIdx,
GlfSimpleLight const& light,
347 ~_Delegate()
override =
default;
350 template <
typename T>
353 _valueCacheMap[
id][key] =
value;
355 template <
typename T>
363 return vParams.
Get<
T>();
368 vCache.count(key) > 0) {
378 TfToken const& paramName)
override;
380 bool IsEnabled(
TfToken const& option)
const override;
382 GetRenderBufferDescriptor(
SdfPath const&
id)
override;
389 _ValueCacheMap _valueCacheMap;
392 std::unique_ptr<class HdxFreeCameraSceneDelegate> _freeCameraSceneDelegate;
401 SdfPath _colorizeSelectionTaskId;
402 SdfPath _colorCorrectionTaskId;
405 SdfPath _pickFromRenderBufferTaskId;
422 std::optional<CameraUtilConformWindowPolicy> _overrideWindowPolicy;
429 #endif // PXR_IMAGING_HDX_TASK_CONTROLLER_H
HDX_API void SetOverrideWindowPolicy(const std::optional< CameraUtilConformWindowPolicy > &policy)
HDX_API ~HdxTaskController()
HDX_API void SetRenderParams(HdxRenderTaskParams const ¶ms)
hboost::math::policies::policy< hboost::math::policies::domain_error< hboost::math::policies::ignore_error >, hboost::math::policies::pole_error< hboost::math::policies::ignore_error >, hboost::math::policies::overflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::underflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::denorm_error< hboost::math::policies::ignore_error >, hboost::math::policies::rounding_error< hboost::math::policies::ignore_error >, hboost::math::policies::evaluation_error< hboost::math::policies::ignore_error >, hboost::math::policies::indeterminate_result_error< hboost::math::policies::ignore_error > > policy
HDX_API HdAovDescriptor GetRenderOutputSettings(TfToken const &name) const
Get parameters for an AOV.
HDX_API void SetBBoxParams(const HdxBoundingBoxTaskParams ¶ms)
Set the bounding box params.
GLsizei const GLfloat * value
GLenum GLenum GLsizei const GLuint GLboolean enabled
HDX_API void SetRenderOutputs(TfTokenVector const &names)
HDX_API void SetRenderBufferSize(const GfVec2i &size)
std::vector< HdTaskSharedPtr > HdTaskSharedPtrVector
HDX_API HdRenderBuffer * GetRenderOutput(TfToken const &name)
GLenum const GLfloat * params
HdRenderIndex * GetRenderIndex()
Return the render index this controller is bound to.
HDX_API void SetViewportRenderOutput(TfToken const &name)
HdRenderIndex const * GetRenderIndex() const
SdfPath const & GetControllerId() const
bool TfMapLookup(Container const &map, Key const &key, Result *valuePtr)
HDX_API void SetFraming(const CameraUtilFraming &framing)
HDX_API void SetLightingState(GlfSimpleLightingContextPtr const &src)
HDX_API HdTaskSharedPtrVector const GetPickingTasks() const
HDX_API void SetCameraPath(SdfPath const &id)
HDX_API HdxTaskController(HdRenderIndex *renderIndex, SdfPath const &controllerId, bool gpuEnabled=true)
HDX_API void SetSelectionColor(GfVec4f const &color)
Set the selection color.
HDX_API void SetFreeCameraClipPlanes(std::vector< GfVec4d > const &clipPlanes)
std::vector< TfToken > TfTokenVector
Convenience types.
GLuint const GLchar * name
HDX_API bool IsConverged() const
Return whether the image has converged.
std::vector< class SdfPath > SdfPathVector
A vector of SdfPaths.
HDX_API void SetShadowParams(HdxShadowTaskParams const ¶ms)
HDX_API void SetSelectionEnableOutline(bool enableOutline)
HDX_API void SetRenderOutputSettings(TfToken const &name, HdAovDescriptor const &desc)
Set custom parameters for an AOV.
HDX_API void SetColorCorrectionParams(HdxColorCorrectionTaskParams const ¶ms)
Configure color correction by settings params.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
HDX_API void SetEnablePresentation(bool enabled)
HDX_API void SetRenderViewport(GfVec4d const &viewport)
#define PXR_NAMESPACE_CLOSE_SCOPE
HDX_API HdTaskSharedPtrVector const GetRenderingTasks() const
HDX_API void SetRenderTags(TfTokenVector const &renderTags)
HDX_API void SetPresentationOutput(TfToken const &api, VtValue const &framebuffer)
HDX_API void SetSelectionOutlineRadius(unsigned int radius)
HDX_API void SetEnableSelection(bool enable)
Turns the selection task on or off.
HDX_API void SetCollection(HdRprimCollection const &collection)
Set the collection to be rendered.
HDX_API void SetFreeCameraMatrices(GfMatrix4d const &viewMatrix, GfMatrix4d const &projectionMatrix)
HDX_API void SetEnableShadows(bool enable)
Turns the shadow task on or off.
HDX_API void SetSelectionLocateColor(GfVec4f const &color)
Set the selection locate (over) color.