Loading...
Searching...
No Matches
materialBindingResolvingSceneIndex.h
1//
2// Copyright 2022 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_MATERIAL_BINDING_RESOLVING_SCENE_INDEX_H
7#define PXR_IMAGING_HDSI_MATERIAL_BINDING_RESOLVING_SCENE_INDEX_H
8
9#include "pxr/imaging/hd/filteringSceneIndex.h"
10#include "pxr/imaging/hdsi/api.h"
11
12#include "pxr/pxr.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
17
23{
24public:
25 HDSI_API
26 static HdsiMaterialBindingResolvingSceneIndexRefPtr
27 New(const HdSceneIndexBaseRefPtr& inputSceneIndex,
28 const TfTokenVector& purposePriorityOrder,
29 const TfToken& dstPurpose);
30
31public: // HdSceneIndex overrides
32 HDSI_API
33 HdSceneIndexPrim GetPrim(const SdfPath& primPath) const override;
34 HDSI_API
35 SdfPathVector GetChildPrimPaths(const SdfPath& primPath) const override;
36
37protected: // HdSingleInputFilteringSceneIndexBase overrides
38 void _PrimsAdded(
39 const HdSceneIndexBase& sender,
40 const HdSceneIndexObserver::AddedPrimEntries& entries) override;
41 void _PrimsRemoved(
42 const HdSceneIndexBase& sender,
43 const HdSceneIndexObserver::RemovedPrimEntries& entries) override;
44 void _PrimsDirtied(
45 const HdSceneIndexBase& sender,
46 const HdSceneIndexObserver::DirtiedPrimEntries& entries) override;
47
48protected:
50 const HdSceneIndexBaseRefPtr& inputSceneIndex,
51 const TfTokenVector& purposePriorityOrder,
52 const TfToken& dstPurpose);
54
55private:
56 TfTokenVector _purposePriorityOrder;
57 TfToken _dstPurpose;
58};
59
60PXR_NAMESPACE_CLOSE_SCOPE
61
62#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.
Scene Index that resolves materialBindings that have multiple purposes into a single purpose.
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.
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:274
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
#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
std::vector< TfToken > TfTokenVector
Convenience types.
Definition: token.h:440