HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
extComputationDependencySceneIndex.h
Go to the documentation of this file.
1 
2 //
3 // Copyright 2024 Pixar
4 //
5 // Licensed under the terms set forth in the LICENSE.txt file available at
6 // https://openusd.org/license.
7 //
8 #ifndef PXR_IMAGING_HDSI_EXT_COMPUTATION_DEPENDENCY_SCENE_INDEX_H
9 #define PXR_IMAGING_HDSI_EXT_COMPUTATION_DEPENDENCY_SCENE_INDEX_H
10 
11 #include "pxr/imaging/hdsi/api.h"
13 
15 
17 
18 /// \class HdsiExtComputationDependencySceneIndex
19 ///
20 /// Adds dependencies to dependencies schema for ext computations.
21 ///
22 /// More precisely, it adds a dependency of the value of an output of a
23 /// computation on any input value or the value of any output of another
24 /// computation serving as computation input.
25 /// E.g., it adds a dependency of the locator
26 /// extComputation/outputs/FOO/value on extComputation/inputValues
27 /// (on the same ext computation prim) or extComputation/outputs/BAR/value
28 /// (on a different ext computation prim).
29 ///
30 /// For an ext computation primvar (on a non-ext computation prim), it
31 /// adds a dependency on the corresponding primvar value on the input of the
32 /// respective computation output.
33 /// E.g., it adds a dependency of the locator
34 /// primvars/FOO/primvarValue on extComputation/outputs/FOO/value (on the
35 /// ext computation prim identified by the path data source at
36 /// extComputationPrimvars/FOO/sourceComputation).
37 ///
38 /// Also adds dependencies for these dependencies.
39 ///
42 {
43 public:
44  HDSI_API
45  static HdsiExtComputationDependencySceneIndexRefPtr
46  New(const HdSceneIndexBaseRefPtr &inputSceneIndex);
47 
48  HDSI_API
49  HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override;
50 
51  HDSI_API
52  SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override;
53 
54 protected:
55  HDSI_API
56  void _PrimsAdded(
57  const HdSceneIndexBase &sender,
58  const HdSceneIndexObserver::AddedPrimEntries &entries) override;
59 
60  HDSI_API
61  void _PrimsRemoved(
62  const HdSceneIndexBase &sender,
63  const HdSceneIndexObserver::RemovedPrimEntries &entries) override;
64 
65  HDSI_API
66  void _PrimsDirtied(
67  const HdSceneIndexBase &sender,
68  const HdSceneIndexObserver::DirtiedPrimEntries &entries) override;
69 
70  HDSI_API
72  const HdSceneIndexBaseRefPtr &inputSceneIndex);
73 
74 };
75 
77 
78 #endif //PXR_IMAGING_HDSI_EXT_COMPUTATION_PRIMVAR_PRUNING_SCENE_INDEX_H
HDSI_API SdfPathVector GetChildPrimPaths(const SdfPath &primPath) const override
PXR_NAMESPACE_OPEN_SCOPE TF_DECLARE_WEAK_AND_REF_PTRS(HdsiExtComputationDependencySceneIndex)
HDSI_API HdsiExtComputationDependencySceneIndex(const HdSceneIndexBaseRefPtr &inputSceneIndex)
std::vector< class SdfPath > SdfPathVector
HDSI_API void _PrimsDirtied(const HdSceneIndexBase &sender, const HdSceneIndexObserver::DirtiedPrimEntries &entries) override
HDSI_API void _PrimsAdded(const HdSceneIndexBase &sender, const HdSceneIndexObserver::AddedPrimEntries &entries) override
Definition: path.h:273
#define HDSI_API
Definition: api.h:23
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
HDSI_API void _PrimsRemoved(const HdSceneIndexBase &sender, const HdSceneIndexObserver::RemovedPrimEntries &entries) override
HDSI_API HdSceneIndexPrim GetPrim(const SdfPath &primPath) const override
static HDSI_API HdsiExtComputationDependencySceneIndexRefPtr New(const HdSceneIndexBaseRefPtr &inputSceneIndex)