HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sceneIndexPlugin.h
Go to the documentation of this file.
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 PXR_IMAGING_HD_SCENE_INDEX_PLUGIN_H
8 #define PXR_IMAGING_HD_SCENE_INDEX_PLUGIN_H
9 
10 #include "pxr/pxr.h"
11 #include "pxr/imaging/hd/api.h"
14 
16 
18 {
19 public:
20 
21  HD_API
22  HdSceneIndexBaseRefPtr AppendSceneIndex(
23  const std::string &renderInstanceId,
24  const HdSceneIndexBaseRefPtr &inputScene,
25  const HdContainerDataSourceHandle &inputArgs);
26 
27 protected:
28 
29  /// Subclasses implement this to instantiate one or more scene indicies
30  /// which take the provided scene as input. The return value should be
31  /// the final scene created -- or the inputScene itself if nothing is
32  /// created.
33  HD_API
34  virtual HdSceneIndexBaseRefPtr _AppendSceneIndex(
35  const HdSceneIndexBaseRefPtr &inputScene,
36  const HdContainerDataSourceHandle &inputArgs);
37 
38  /// Subclasses implement this to instantiate one or more scene indicies
39  /// which take the provided scene as input. The return value should be
40  /// the final scene created -- or the inputScene itself if nothing is
41  /// created.
42  ///
43  /// Callers can override this method if they want to get the render
44  /// instance ID in addition to the input scene and arguments. Callers
45  /// should only override one of the two _AppendSceneIndex overrides: if
46  /// both are overridden, only this override will be called.
47  ///
48  HD_API
49  virtual HdSceneIndexBaseRefPtr _AppendSceneIndex(
50  const std::string &renderInstanceId,
51  const HdSceneIndexBaseRefPtr &inputScene,
52  const HdContainerDataSourceHandle &inputArgs);
53 
54  HdSceneIndexPlugin() = default;
55  HD_API
56  ~HdSceneIndexPlugin() override;
57 
58 };
59 
61 
62 #endif // PXR_IMAGING_HD_SCENE_INDEX_PLUGIN_H
HD_API ~HdSceneIndexPlugin() override
#define HD_API
Definition: api.h:23
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
virtual HD_API HdSceneIndexBaseRefPtr _AppendSceneIndex(const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs)
HdSceneIndexPlugin()=default
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
HD_API HdSceneIndexBaseRefPtr AppendSceneIndex(const std::string &renderInstanceId, const HdSceneIndexBaseRefPtr &inputScene, const HdContainerDataSourceHandle &inputArgs)