VTK  9.4.20250227
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
15VTK_ABI_NAMESPACE_BEGIN
16
17class vtkMatrix4x4;
18
38class VTKRENDERINGOPENXR_EXPORT vtkOpenXRSceneComponent : public vtkObject
39{
40 struct vtkInternals;
41
42public:
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
73
77 const std::string& GetMarkerText() const;
78
80
83 double GetMarkerWidth() const;
84 double GetMarkerHeight() const;
86
91
96 int64_t lastModifiedTime, vtkMatrix4x4* matrix, double width, double height, std::string text);
97
98protected:
101
102private:
104 void operator=(const vtkOpenXRSceneComponent&) = delete;
105
106 int64_t LastModifiedTime{ 0 };
107 ComponentTypes Type{ Unknown };
108 std::unique_ptr<vtkInternals> Impl{};
109};
110
111VTK_ABI_NAMESPACE_END
112
113#endif
represent and manipulate 4x4 transformation matrices
abstract base class for most VTK objects
Definition vtkObject.h:162
void UpdateMarkerRepresentation(int64_t lastModifiedTime, vtkMatrix4x4 *matrix, double width, double height, std::string text)
Update internal representation of Markers.
static vtkOpenXRSceneComponent * New()
double GetMarkerWidth() const
Marker physical size in meters (rectangle)
void Initialize(ComponentTypes type)
Initialize the component for a given type, this changes the active representation.
double GetMarkerHeight() const
Marker physical size in meters (rectangle)
vtkMatrix4x4 * GetMarkerPose() const
This is the main represention of the marker.
const std::string & GetMarkerText() const
QrCode decoded text if any.
~vtkOpenXRSceneComponent() override