VTK  9.7.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 ShutDown() override;
46 
51  void UpdateViewport() override;
52 
56  void UpdateTrackers() override;
57 
61  void UpdateViewAndProjectionMatrix() override;
62 
66  void UpdateButtonState() override;
67 
72  void CalculateFrustumFit(const double bounds[6], double position[3], double viewUp[3]) override;
73 
75 
80  void BeginFrame() override;
81  void EndFrame() override {};
83 
84 protected:
86  ~vtkZSpaceCoreSDKManager() override;
87 
88  ZCContext ZSpaceContext = nullptr;
89  ZCHandle DisplayHandle = nullptr;
90  ZCHandle BufferHandle = nullptr;
91  ZCHandle ViewportHandle = nullptr;
92  ZCHandle FrustumHandle = nullptr;
93  ZCHandle StylusHandle = nullptr;
94 
100 
105  void ConvertZSpaceMatrixToVTKMatrix(ZSMatrix4 zSpaceMatrix, vtkMatrix4x4* vtkMatrix);
106 
107 private:
109  void operator=(const vtkZSpaceCoreSDKManager&) = delete;
110 };
111 
112 VTK_ABI_NAMESPACE_END
113 
114 #endif
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:31
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 trackers.
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:77
Abstract zSpace SDK manager class.
static vtkZSpaceCoreSDKManager * New()
~vtkZSpaceCoreSDKManager() override
void BeginFrame() override
Notify the zSpace SDK for the beginning 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 beginning of a frame.
void UpdateButtonState() override
Update the stylus buttons state.
void ShutDown() override
Shutdown the zSpace SDK (clean its internal 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).