Loading...
Searching...
No Matches
renderSettingsFilteringSceneIndex.h
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//
7#ifndef PXR_IMAGING_HDSI_RENDER_SETTINGS_FILTERING_SCENE_INDEX_H
8#define PXR_IMAGING_HDSI_RENDER_SETTINGS_FILTERING_SCENE_INDEX_H
9
10#include "pxr/imaging/hdsi/api.h"
11#include "pxr/imaging/hd/filteringSceneIndex.h"
12
13#include "pxr/base/vt/array.h"
15#include "pxr/base/tf/token.h"
16
17PXR_NAMESPACE_OPEN_SCOPE
18
19#define HDSI_RENDER_SETTINGS_FILTERING_SCENE_INDEX_TOKENS \
20 (namespacePrefixes) \
21 (fallbackPrimDs)
22
23TF_DECLARE_PUBLIC_TOKENS(HdsiRenderSettingsFilteringSceneIndexTokens, HDSI_API,
24 HDSI_RENDER_SETTINGS_FILTERING_SCENE_INDEX_TOKENS);
25
27
42{
43public:
44 HDSI_API
45 static HdsiRenderSettingsFilteringSceneIndexRefPtr
46 New(const HdSceneIndexBaseRefPtr &inputSceneIndex,
47 const HdContainerDataSourceHandle &inputArgs);
48
49 HDSI_API
50 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
51
52 HDSI_API
53 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
54
56 HDSI_API
58
59 HDSI_API
60 static const SdfPath& GetRenderScope();
61
62protected:
63 HDSI_API
65 const HdSceneIndexBaseRefPtr &inputSceneIndex,
66 const HdContainerDataSourceHandle &inputArgs);
67
69 HDSI_API
71 const HdSceneIndexBase &sender,
72 const HdSceneIndexObserver::AddedPrimEntries &entries) override;
73
74 HDSI_API
75 void _PrimsRemoved(
76 const HdSceneIndexBase &sender,
77 const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
78
79 HDSI_API
80 void _PrimsDirtied(
81 const HdSceneIndexBase &sender,
82 const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
83
84private:
85 const VtArray<TfToken> _namespacePrefixes;
86 HdContainerDataSourceHandle _fallbackPrimDs;
87};
88
89PXR_NAMESPACE_CLOSE_SCOPE
90
91#endif //PXR_IMAGING_HDSI_RENDER_SETTINGS_FILTERING_SCENE_INDEX_H
Abstract interface to scene data.
Definition sceneIndex.h:55
An abstract base class for a filtering scene index that observes a single input scene index.
Scene index that provides the following functionality in service of the HdRenderSettingsSchema:
HDSI_API void _PrimsAdded(const HdSceneIndexBase &sender, const HdSceneIndexObserver::AddedPrimEntries &entries) override
Satisfying HdSingleInputFilteringSceneIndexBase.
HDSI_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
Returns a pair of (prim type, datasource).
HDSI_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
Returns the paths of all scene index prims located immediately below primPath.
static HDSI_API const SdfPath & GetFallbackPrimPath()
Public API.
A path value used to locate objects in layers or scenegraphs.
Definition path.h:281
Represents an arbitrary dimensional rectangular container class.
Definition array.h:213
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
Definition declarePtrs.h:72
This file defines some macros that are useful for declaring and using static TfTokens.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Small struct representing a 'prim' in the Hydra scene index.
Definition sceneIndex.h:36
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...