VTK  9.3.1
vtkZSpaceCoreSDKManager.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
15 #ifndef vtkZSpaceCoreSDKManager_h
16 #define vtkZSpaceCoreSDKManager_h
17 
18 #include "vtkZSpaceSDKManager.h"
19 
20 #include <vector> // for std::vector
21 #include <zspace.h> // zspace header
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 
25 class vtkRenderWindow;
26 class vtkMatrix4x4;
27 
29 {
30 public:
31  static vtkZSpaceCoreSDKManager* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
39  void InitializeZSpace() override;
40 
45  void UpdateViewport() override;
46 
50  void UpdateTrackers() override;
51 
55  void UpdateViewAndProjectionMatrix() override;
56 
60  void UpdateButtonState() override;
61 
66  void CalculateFrustumFit(const double bounds[6], double position[3], double viewUp[3]) override;
67 
69 
74  void BeginFrame() override;
75  void EndFrame() override{};
77 
78 protected:
80  ~vtkZSpaceCoreSDKManager() override;
81 
82  ZCContext ZSpaceContext = nullptr;
83  ZCHandle DisplayHandle = nullptr;
84  ZCHandle BufferHandle = nullptr;
85  ZCHandle ViewportHandle = nullptr;
86  ZCHandle FrustumHandle = nullptr;
87  ZCHandle StylusHandle = nullptr;
88 
94 
99  void ConvertZSpaceMatrixToVTKMatrix(ZSMatrix4 zSpaceMatrix, vtkMatrix4x4* vtkMatrix);
100 
101 private:
103  void operator=(const vtkZSpaceCoreSDKManager&) = delete;
104 };
105 
106 VTK_ABI_NAMESPACE_END
107 
108 #endif
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:30
void CalculateFrustumFit(const double bounds[6], double position[3], double viewUp[3]) override
Let zSpace compute the viewer scale, camera position and camera view up from the input bounds...
void UpdateViewport() override
Update the zSpace viewport position and size based on the position and size of the application window...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void UpdateTrackers() override
Update the position of the stylus and head trakers.
zSpace Core SDK manager class.
a simple class to control print indentation
Definition: vtkIndent.h:28
Union representing 4x4 matrix (right-handed OpenGL column-major format). / This structure is used by ...
Definition: zSpaceTypes.h:79
Abstract zSpace SDK manager class.
static vtkZSpaceCoreSDKManager * New()
~vtkZSpaceCoreSDKManager() override
void BeginFrame() override
Notify the zSpace SDK for the begining of a frame.
void UpdateViewAndProjectionMatrix() override
Update the zSpace view and projection matrix for each eye.
void InitializeZSpace() override
Initialize the zSpace SDK and check for zSpace devices : the display, the stylus and the head tracker...
create a window for renderers to draw into
void EndFrame() override
Notify the zSpace SDK for the begining of a frame.
void UpdateButtonState() override
Update the stylus buttons state.
void ConvertZSpaceMatrixToVTKMatrix(ZSMatrix4 zSpaceMatrix, vtkMatrix4x4 *vtkMatrix)
zSpace stores matrix in column-major format (as OpenGL).
void ConvertAndTransposeZSpaceMatrixToVTKMatrix(ZSMatrix4 zSpaceMatrix, vtkMatrix4x4 *vtkMatrix)
zSpace stores matrix in column-major format (as OpenGL).