Loading...
Searching...
No Matches
materialFilteringSceneIndexBase.h
1//
2// Copyright 2021 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef HD_MATERIAL_FILTERING_SCENE_INDEX_H
8#define HD_MATERIAL_FILTERING_SCENE_INDEX_H
9
10
11#include "pxr/imaging/hd/filteringSceneIndex.h"
12#include "pxr/imaging/hd/materialNetworkInterface.h"
13
14#include <functional>
15
16PXR_NAMESPACE_OPEN_SCOPE
17
19
28{
29public:
30 HD_API
31 HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override final;
32
33 HD_API
34 SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override final;
35
36 using FilteringFnc =
37 std::function<void(HdMaterialNetworkInterface *)>;
38
39 HD_API
40 FilteringFnc GetFilteringFunction() const;
41
42protected:
43 virtual FilteringFnc _GetFilteringFunction() const = 0;
44
45 HD_API
46 void _PrimsAdded(
47 const HdSceneIndexBase &sender,
48 const HdSceneIndexObserver::AddedPrimEntries &entries) override final;
49
50 HD_API
51 void _PrimsRemoved(
52 const HdSceneIndexBase &sender,
53 const HdSceneIndexObserver::RemovedPrimEntries &entries) override final;
54
55 HD_API
56 void _PrimsDirtied(
57 const HdSceneIndexBase &sender,
58 const HdSceneIndexObserver::DirtiedPrimEntries &entries) override final;
59
60 HD_API
62 const HdSceneIndexBaseRefPtr &inputSceneIndex);
63
64};
65
66PXR_NAMESPACE_CLOSE_SCOPE
67
68#endif //HD_MATERIAL_FILTERING_SCENE_INDEX_H
Base class for implementing scene indices which read from and write to only material network data sou...
HD_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override final
Returns the paths of all scene index prims located immediately below primPath.
HD_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override final
Returns a pair of (prim type, datasource).
Abstract interface for querying and mutating a material network.
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.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:281
#define TF_DECLARE_WEAK_AND_REF_PTRS(type)
Define standard weak, ref, and vector pointer types.
Definition: declarePtrs.h:72
Small struct representing a 'prim' in the Hydra scene index.
Definition: sceneIndex.h:36