VTK  9.7.1
vtkOpenXRSceneComponent.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 vtkOpenXRSceneComponent_h
5 #define vtkOpenXRSceneComponent_h
6 
7 #include "vtkObject.h"
8 #include "vtkRenderingOpenXRModule.h" // For export macro
9 #include "vtkSmartPointer.h" // For vtkSmartPointer
10 
11 #include <array> // For std::array
12 #include <cstdint> // For int types
13 #include <memory> // For std::unique_ptr
14 
15 VTK_ABI_NAMESPACE_BEGIN
16 
17 class vtkMatrix4x4;
18 
38 class VTKRENDERINGOPENXR_EXPORT vtkOpenXRSceneComponent : public vtkObject
39 {
40  struct vtkInternals;
41 
42 public:
43  static vtkOpenXRSceneComponent* New();
45 
47  {
48  Unknown, // May be used in case the runtime supports more than we know of
49  Marker // Only QrCode at this time
50  };
51 
56  vtkGetMacro(LastModifiedTime, int64_t);
57 
61  vtkGetMacro(Type, ComponentTypes);
62 
72  vtkMatrix4x4* GetMarkerPose() const;
73 
77  const std::string& GetMarkerText() const;
78 
80 
83  double GetMarkerWidth() const;
84  double GetMarkerHeight() const;
86 
90  void Initialize(ComponentTypes type);
91 
95  void UpdateMarkerRepresentation(
96  int64_t lastModifiedTime, vtkMatrix4x4* matrix, double width, double height, std::string text);
97 
98 protected:
100  ~vtkOpenXRSceneComponent() override;
101 
102 private:
104  void operator=(const vtkOpenXRSceneComponent&) = delete;
105 
106  int64_t LastModifiedTime{ 0 };
107  ComponentTypes Type{ Unknown };
108  std::unique_ptr<vtkInternals> Impl;
109 };
110 
111 VTK_ABI_NAMESPACE_END
112 
113 #endif
vtkOpenXRSceneComponent represent a component in the XR scene.
abstract base class for most VTK objects
Definition: vtkObject.h:52
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:31
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...