Loading...
Searching...
No Matches
legacyRenderSettingsSceneIndex.h
1//
2// Copyright 2026 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_USD_IMAGING_USD_IMAGING_LEGACY_RENDER_SETTINGS_SCENE_INDEX_H
8#define PXR_USD_IMAGING_USD_IMAGING_LEGACY_RENDER_SETTINGS_SCENE_INDEX_H
9
10#include "pxr/usdImaging/usdImaging/api.h"
11
12#include "pxr/imaging/hd/dataSource.h"
13#include "pxr/imaging/hd/filteringSceneIndex.h"
14#include "pxr/imaging/hd/renderDelegate.h"
15#include "pxr/imaging/hd/sceneIndex.h"
16#include "pxr/imaging/hd/sceneIndexObserver.h"
17
18#include "pxr/usd/sdf/path.h"
19
21#include "pxr/base/tf/token.h"
22#include "pxr/base/vt/value.h"
23
24#include "pxr/pxr.h"
25
26#include <unordered_map>
27
28PXR_NAMESPACE_OPEN_SCOPE
29
31
40{
41public:
42 USDIMAGING_API
43 static
44 UsdImagingLegacyRenderSettingsSceneIndexRefPtr
45 New(const HdSceneIndexBaseRefPtr& inputSceneIndex);
46
47 USDIMAGING_API
49 GetPrim(const SdfPath& primPath) const override;
50
51 USDIMAGING_API
52 SdfPathVector
53 GetChildPrimPaths(const SdfPath& primPath) const override;
54
55 USDIMAGING_API
56 void
57 SetRenderSetting(
58 const TfToken& id,
59 const VtValue& value);
60
61protected:
62 void
63 _PrimsAdded(
64 const HdSceneIndexBase&,
65 const HdSceneIndexObserver::AddedPrimEntries &entries) override;
66 void
67 _PrimsDirtied(
68 const HdSceneIndexBase&,
69 const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
70 void
71 _PrimsRemoved(
72 const HdSceneIndexBase&,
73 const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
74
76 HdSceneIndexBaseRefPtr const &inputSceneIndex);
77
78private:
79 using _MapType = std::unordered_map<TfToken, VtValue, TfToken::HashFunctor>;
80 using _EntryType = _MapType::value_type;
81
82 void
83 _Compose();
84
85 _MapType _map;
86 HdContainerDataSourceHandle _dataSource;
87};
88
89PXR_NAMESPACE_CLOSE_SCOPE
90
91#endif // PXR_USD_IMAGING_USD_IMAGING_LEGACY_RENDER_SETTINGS_SCENE_INDEX_H
Abstract interface to scene data.
Definition: sceneIndex.h:54
An abstract base class for a filtering scene index that observes a single input scene index.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:281
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
UsdImagingLegacyRenderSettingsSceneIndex.
USDIMAGING_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
USDIMAGING_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:90
Standard pointer typedefs.
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:58
Small struct representing a 'prim' in the Hydra scene index.
Definition: sceneIndex.h:35
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...