VTK  9.4.20250227
vtkOpenXRSceneObserver.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
4#ifndef vtkOpenXRSceneObserver_h
5#define vtkOpenXRSceneObserver_h
6
7#include "vtkObject.h"
8#include "vtkRenderingOpenXRModule.h" // For export macro
9
10#include <memory> // For std::unique_ptr
11
12VTK_ABI_NAMESPACE_BEGIN
13
16
56class VTKRENDERINGOPENXR_EXPORT vtkOpenXRSceneObserver : public vtkObject
57{
58 struct vtkInternals;
59
60public:
63
67 bool Initialize();
68
75
77
95 {
96 // enum values from OpenXR
97 SnapshotComplete = 1,
98 SnapshotIncompleteFast = 2,
99 OcclusionOptimized = 3,
100 };
101 vtkGetMacro(ComputeConsistency, SceneConsistency);
102 vtkSetMacro(ComputeConsistency, SceneConsistency);
104
106
116 vtkGetMacro(ClippingRadius, double);
117 vtkSetClampMacro(ClippingRadius, double, 0.0, 1e100);
119
125 {
126 // enum values from XrSceneComputeFeatureMSFT
127 Markers = 1000147000,
128 };
129
131
143
145
152 vtkSetMacro(MinimumInterval, double);
153 vtkGetMacro(MinimumInterval, double);
155
156protected:
159
160private:
162 void operator=(const vtkOpenXRSceneObserver&) = delete;
163
164 bool CreateMSFTSceneObserver();
165
166 std::unique_ptr<vtkInternals> Impl{};
167
168 double MinimumInterval{ 2.0 };
169 double ClippingRadius{ 2.0 };
170 SceneConsistency ComputeConsistency{ SceneConsistency::SnapshotComplete };
171};
172
173VTK_ABI_NAMESPACE_END
174
175#endif
abstract base class for most VTK objects
Definition vtkObject.h:162
OpenXR rendering window.
static vtkOpenXRSceneObserver * New()
bool IsComputeFeatureEnabled(SceneFeature feature) const
Enable or disable or check availability of a scene feature.
bool Initialize()
Creates runtime scene observer.
bool EnableComputeFeature(SceneFeature feature)
Enable or disable or check availability of a scene feature.
void DisableComputeFeature(SceneFeature feature)
Enable or disable or check availability of a scene feature.
bool UpdateSceneData()
Update scene data by polling the runtime.
~vtkOpenXRSceneObserver() override
bool IsComputeFeatureSupported(SceneFeature feature) const
Enable or disable or check availability of a scene feature.