HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
renderSettingsFlatteningSceneIndex.h
Go to the documentation of this file.
1 //
2 // Copyright 2023 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 #ifndef PXR_USD_IMAGING_USD_IMAGING_RENDER_SETTINGS_FLATTENING_SCENE_INDEX_H
7 #define PXR_USD_IMAGING_USD_IMAGING_RENDER_SETTINGS_FLATTENING_SCENE_INDEX_H
8 
9 #include "pxr/pxr.h"
12 
14 
16 
17 ///
18 /// Stateless scene index that adds a flattened render settings representation
19 /// (as modeled by HdRenderSettingsSchema) for downstream consumption by a Hydra
20 /// render backend, and adds dependencies from the settings prim to
21 /// the targeted products and vars (using HdDependenciesSchema) so that change
22 /// notices are forwarded back to appropriate locators on the flattened data
23 /// source.
24 ///
26 {
27 public:
29  static UsdImagingRenderSettingsFlatteningSceneIndexRefPtr
30  New(const HdSceneIndexBaseRefPtr &inputSceneIndex);
31 
33  HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
35  SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
36 
37 protected:
39  const HdSceneIndexBaseRefPtr &inputSceneIndex);
40 
41  void _PrimsAdded(
42  const HdSceneIndexBase &sender,
43  const HdSceneIndexObserver::AddedPrimEntries &entries) override;
44 
45  void _PrimsRemoved(
46  const HdSceneIndexBase &sender,
47  const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
48 
49  void _PrimsDirtied(
50  const HdSceneIndexBase &sender,
51  const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
52 };
53 
55 
56 #endif // PXR_USD_IMAGING_USD_IMAGING_RENDER_SETTINGS_FLATTENING_SCENE_INDEX_H
USDIMAGING_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
#define USDIMAGING_API
Definition: api.h:23
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_REF_PTRS(UsdImagingRenderSettingsFlatteningSceneIndex)
UsdImagingRenderSettingsFlatteningSceneIndex(const HdSceneIndexBaseRefPtr &inputSceneIndex)
void _PrimsRemoved(const HdSceneIndexBase &sender, const HdSceneIndexObserver::RemovedPrimEntries &entries) override
void _PrimsDirtied(const HdSceneIndexBase &sender, const HdSceneIndexObserver::DirtiedPrimEntries &entries) override
void _PrimsAdded(const HdSceneIndexBase &sender, const HdSceneIndexObserver::AddedPrimEntries &entries) override
static USDIMAGING_API UsdImagingRenderSettingsFlatteningSceneIndexRefPtr New(const HdSceneIndexBaseRefPtr &inputSceneIndex)
std::vector< class SdfPath > SdfPathVector
USDIMAGING_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Definition: path.h:273
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74