HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dependencySceneIndexPlugin.h
Go to the documentation of this file.
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 
7 #ifndef PXR_IMAGING_HD_ST_DEPENDENCY_SCENE_INDEX_PLUGIN_H
8 #define PXR_IMAGING_HD_ST_DEPENDENCY_SCENE_INDEX_PLUGIN_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/imaging/hdSt/api.h"
13 
15 
16 /// \class HdSt_DependencySceneIndexPlugin
17 ///
18 /// Plugin adds a scene index that declares Storm-specific dependencies to
19 /// trigger the necessary invalidation.
20 ///
21 /// Currently, the scene index has two uses.
22 ///
23 /// 1) For volumes.
24 /// Specfically, the declaration allows the volumeFieldBinding data source
25 /// locator of a volume prim to be invalidated if any of the targeted volume
26 /// fields changes.
27 /// That is, if, e.g., the filePath of a volume field changes, then the volume
28 /// using that volume field will be dirtied so that HdStVolume will update
29 /// which 3d textures it will use.
30 ///
31 /// 2) For meshes.
32 /// Adding dependency of the material binding on the material datasource
33 /// of the bound material.
34 /// Recall that a mesh has to be quadrangulated if the bound material is using
35 /// any ptex texture. If there is any change to the material, this scene index
36 /// will dirty the mesh's materialBindings locator. This causes a
37 /// HdStMesh::Sync with the HdChangeTracker::DirtyMaterialId dirty bit set so
38 /// the mesh will re-evaluate whether the bound material is using any ptex
39 /// texture.
40 ///
42 {
43 public:
45 
46 protected:
47  HdSceneIndexBaseRefPtr _AppendSceneIndex(
48  const HdSceneIndexBaseRefPtr &inputScene,
49  const HdContainerDataSourceHandle &inputArgs) override;
50 };
51 
53 
54 #endif // PXR_IMAGING_HD_ST_DEPENDENCY_SCENE_INDEX_PLUGIN_H
HdSceneIndexBaseRefPtr _AppendSceneIndex(const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs) override
#define PXR_NAMESPACE_OPEN_SCOPE
Definition: pxr.h:73
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74