HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
materialBindingsResolvingSceneIndex.h
Go to the documentation of this file.
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 #ifndef PXR_USD_IMAGING_USD_IMAGING_MATERIAL_BINDINGS_RESOLVING_SCENE_INDEX_H
7 #define PXR_USD_IMAGING_USD_IMAGING_MATERIAL_BINDINGS_RESOLVING_SCENE_INDEX_H
8 
9 #include "pxr/pxr.h"
12 
14 
16 
17 /// Scene index that computes the resolved material binding for a given
18 /// purpose from the flattened direct material bindings and collection
19 /// material bindings.
20 ///
21 /// \note Current support does not factor in collection bindings.
22 ///
25 {
26 public:
28  static UsdImagingMaterialBindingsResolvingSceneIndexRefPtr
29  New(const HdSceneIndexBaseRefPtr &inputSceneIndex,
30  const HdContainerDataSourceHandle &inputArgs);
31 
34 
36  HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
38  SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
39 
40 protected:
42  const HdSceneIndexBaseRefPtr &inputSceneIndex,
43  const HdContainerDataSourceHandle &inputArgs);
44 
45  void _PrimsAdded(
46  const HdSceneIndexBase &sender,
47  const HdSceneIndexObserver::AddedPrimEntries &entries) override;
48 
49  void _PrimsRemoved(
50  const HdSceneIndexBase &sender,
51  const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
52 
53  void _PrimsDirtied(
54  const HdSceneIndexBase &sender,
55  const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
56 };
57 
59 
60 #endif // PXR_USD_IMAGING_USD_IMAGING_GL_MATERIAL_BINDINGS_RESOLVING_SCENE_INDEX_H
UsdImagingMaterialBindingsResolvingSceneIndex(const HdSceneIndexBaseRefPtr &inputSceneIndex, const HdContainerDataSourceHandle &inputArgs)
#define USDIMAGING_API
Definition: api.h:23
void _PrimsDirtied(const HdSceneIndexBase &sender, const HdSceneIndexObserver::DirtiedPrimEntries &entries) override
static USDIMAGING_API UsdImagingMaterialBindingsResolvingSceneIndexRefPtr New(const HdSceneIndexBaseRefPtr &inputSceneIndex, const HdContainerDataSourceHandle &inputArgs)
std::vector< class SdfPath > SdfPathVector
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_REF_PTRS(UsdImagingMaterialBindingsResolvingSceneIndex)
Definition: path.h:273
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
void _PrimsRemoved(const HdSceneIndexBase &sender, const HdSceneIndexObserver::RemovedPrimEntries &entries) override
USDIMAGING_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
void _PrimsAdded(const HdSceneIndexBase &sender, const HdSceneIndexObserver::AddedPrimEntries &entries) override
USDIMAGING_API ~UsdImagingMaterialBindingsResolvingSceneIndex() override
USDIMAGING_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override