Loading...
Searching...
No Matches
sceneMaterialPruningSceneIndex.h
1//
2// Copyright 2024 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6#ifndef PXR_IMAGING_HDSI_SCENE_MATERIAL_PRUNING_SCENE_INDEX_H
7#define PXR_IMAGING_HDSI_SCENE_MATERIAL_PRUNING_SCENE_INDEX_H
8
9#include "pxr/pxr.h"
10
11#include "pxr/imaging/hd/filteringSceneIndex.h"
12#include "pxr/imaging/hdsi/api.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
17
18namespace HdsiSceneMaterialPruningSceneIndex_Impl
19{
20
21struct _Info;
22using _InfoSharedPtr = std::shared_ptr<_Info>;
23
24}
25
47{
48public:
49 HDSI_API
50 static HdsiSceneMaterialPruningSceneIndexRefPtr
51 New(HdSceneIndexBaseRefPtr const &inputSceneIndex);
52
54 HDSI_API
55 bool GetEnabled() const;
57 HDSI_API
58 void SetEnabled(bool);
59
60public: // HdSceneIndex overrides
61 HDSI_API
62 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
63 HDSI_API
64 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
65
66protected: // HdSingleInputFilteringSceneIndexBase overrides
67 HDSI_API
68 void _PrimsAdded(
69 const HdSceneIndexBase &sender,
70 const HdSceneIndexObserver::AddedPrimEntries &entries) override;
71 HDSI_API
72 void _PrimsRemoved(
73 const HdSceneIndexBase &sender,
74 const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
75 HDSI_API
76 void _PrimsDirtied(
77 const HdSceneIndexBase &sender,
78 const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
79
80private:
81 HDSI_API
83 HdSceneIndexBaseRefPtr const &inputSceneIndex);
84 HDSI_API
86
87 void _ProcessDirtiedEntryHelper(
90
91 HdsiSceneMaterialPruningSceneIndex_Impl::_InfoSharedPtr const _info;
92};
93
94PXR_NAMESPACE_CLOSE_SCOPE
95
96#endif
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 scene index that prunes materials and material bindings.
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.
HDSI_API bool GetEnabled() const
Is scene index actually pruning?
HDSI_API void SetEnabled(bool)
Enable scene index to prune.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
Definition: declarePtrs.h:72
A notice indicating a prim was invalidated.
Small struct representing a 'prim' in the Hydra scene index.
Definition: sceneIndex.h:35