sceneIndices.h
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 //
7 #ifndef PXR_USD_IMAGING_USD_IMAGING_SCENE_INDICES_H
8 #define PXR_USD_IMAGING_USD_IMAGING_SCENE_INDICES_H
9 
10 #include "pxr/imaging/hd/noticeBatchingSceneIndex.h"
11 #include "pxr/pxr.h"
12 
13 #include "pxr/usdImaging/usdImaging/api.h"
14 
15 #include "pxr/imaging/hd/dataSource.h"
16 #include "pxr/imaging/hd/sceneIndex.h"
18 
19 PXR_NAMESPACE_OPEN_SCOPE
20 
21 TF_DECLARE_REF_PTRS(HdNoticeBatchingSceneIndex);
25 
26 using UsdImagingSceneIndexAppendCallback =
27  std::function<
28  HdSceneIndexBaseRefPtr(HdSceneIndexBaseRefPtr const &)>;
29 
35 {
36  using SceneIndexAppendCallback = UsdImagingSceneIndexAppendCallback;
37 
40  UsdStageRefPtr stage;
44  HdContainerDataSourceHandle stageSceneIndexInputArgs;
46  bool addDrawModeSceneIndex = true;
51  SceneIndexAppendCallback overridesSceneIndexCallback;
52 };
53 
57 {
58  UsdImagingStageSceneIndexRefPtr stageSceneIndex;
59  HdNoticeBatchingSceneIndexRefPtr postInstancingNoticeBatchingSceneIndex;
60  UsdImagingSelectionSceneIndexRefPtr selectionSceneIndex;
61  HdSceneIndexBaseRefPtr finalSceneIndex;
62 };
63 
68 USDIMAGING_API
70 UsdImagingCreateSceneIndices(
71  const UsdImagingCreateSceneIndicesInfo &createInfo);
72 
85 USDIMAGING_API
87 UsdImagingCreateSceneIndices(
88  HdContainerDataSourceHandle const &createArgs,
89  const UsdImagingSceneIndexAppendCallback &overridesSceneIndexCallback);
90 
91 PXR_NAMESPACE_CLOSE_SCOPE
92 
93 #endif
Info needed to create a chain of filtering scene indices (resolving e.g.
Definition: sceneIndices.h:34
Standard pointer typedefs.
A scene index consuming a UsdStage.
The outermost container for scene description, which owns and presents composed prims as a scenegraph...
Definition: stage.h:135
bool addDrawModeSceneIndex
Add scene index resolving usd draw mode.
Definition: sceneIndices.h:46
Some scene indices in the chain of filtering scene indices created by UsdImagingCreateSceneIndices.
Definition: sceneIndices.h:56
A simple scene index adding HdSelectionsSchema to all prims selected with AddSelection.
HdContainerDataSourceHandle stageSceneIndexInputArgs
Inputs to UsdImagingStageSceneIndex (note that includeUnloadedPrims is set automatically when display...
Definition: sceneIndices.h:44
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
Definition: declarePtrs.h:58
SceneIndexAppendCallback overridesSceneIndexCallback
A client can insert scene indices after stage scene index.
Definition: sceneIndices.h:51
bool displayUnloadedPrimsWithBounds
Should we switch the draw mode for unloaded prims to bounds.
Definition: sceneIndices.h:49
UsdStageRefPtr stage
Stage.
Definition: sceneIndices.h:40