VTK: Rendering/ZSpace/vtkZSpaceCoreSDKManager.h Source File

| 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
28 class vtkZSpaceCoreSDKManager : public vtkZSpaceSDKManager
29 {
30 public:
31 static vtkZSpaceCoreSDKManager* New();
32 vtkTypeMacro(vtkZSpaceCoreSDKManager, vtkZSpaceSDKManager);
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:
79 vtkZSpaceCoreSDKManager();
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
93 void ConvertAndTransposeZSpaceMatrixToVTKMatrix(ZSMatrix4 zSpaceMatrix, vtkMatrix4x4* vtkMatrix);
94
99 void ConvertZSpaceMatrixToVTKMatrix(ZSMatrix4 zSpaceMatrix, vtkMatrix4x4* vtkMatrix);
100
101 private:
102 vtkZSpaceCoreSDKManager(const vtkZSpaceCoreSDKManager&) = delete;
103 void operator=(const vtkZSpaceCoreSDKManager&) = delete;
104 };
105
106 VTK_ABI_NAMESPACE_END
107
108 #endif
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:40
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:95
vtkZSpaceCoreSDKManager
zSpace Core SDK manager class.
Definition: vtkZSpaceCoreSDKManager.h:29
vtkZSpaceCoreSDKManager::ConvertZSpaceMatrixToVTKMatrix
void ConvertZSpaceMatrixToVTKMatrix(ZSMatrix4 zSpaceMatrix, vtkMatrix4x4 *vtkMatrix)
zSpace stores matrix in column-major format (as OpenGL).
vtkZSpaceCoreSDKManager::vtkZSpaceCoreSDKManager
vtkZSpaceCoreSDKManager()
vtkZSpaceCoreSDKManager::UpdateTrackers
void UpdateTrackers() override
Update the position of the stylus and head trakers.
vtkZSpaceCoreSDKManager::~vtkZSpaceCoreSDKManager
~vtkZSpaceCoreSDKManager() override
vtkZSpaceCoreSDKManager::FrustumHandle
ZCHandle FrustumHandle
Definition: vtkZSpaceCoreSDKManager.h:86
vtkZSpaceCoreSDKManager::ZSpaceContext
ZCContext ZSpaceContext
Definition: vtkZSpaceCoreSDKManager.h:82
vtkZSpaceCoreSDKManager::CalculateFrustumFit
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.
vtkZSpaceCoreSDKManager::ConvertAndTransposeZSpaceMatrixToVTKMatrix
void ConvertAndTransposeZSpaceMatrixToVTKMatrix(ZSMatrix4 zSpaceMatrix, vtkMatrix4x4 *vtkMatrix)
zSpace stores matrix in column-major format (as OpenGL).
vtkZSpaceCoreSDKManager::InitializeZSpace
void InitializeZSpace() override
Initialize the zSpace SDK and check for zSpace devices : the display, the stylus and the head tracker...
vtkZSpaceCoreSDKManager::UpdateViewport
void UpdateViewport() override
Update the zSpace viewport position and size based on the position and size of the application window...
vtkZSpaceCoreSDKManager::DisplayHandle
ZCHandle DisplayHandle
Definition: vtkZSpaceCoreSDKManager.h:83
vtkZSpaceCoreSDKManager::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkZSpaceCoreSDKManager::UpdateButtonState
void UpdateButtonState() override
Update the stylus buttons state.
vtkZSpaceCoreSDKManager::StylusHandle
ZCHandle StylusHandle
Definition: vtkZSpaceCoreSDKManager.h:87
vtkZSpaceCoreSDKManager::EndFrame
void EndFrame() override
Notify the zSpace SDK for the begining of a frame.
Definition: vtkZSpaceCoreSDKManager.h:75
vtkZSpaceCoreSDKManager::BufferHandle
ZCHandle BufferHandle
Definition: vtkZSpaceCoreSDKManager.h:84
vtkZSpaceCoreSDKManager::ViewportHandle
ZCHandle ViewportHandle
Definition: vtkZSpaceCoreSDKManager.h:85
vtkZSpaceCoreSDKManager::New
static vtkZSpaceCoreSDKManager * New()
vtkZSpaceCoreSDKManager::BeginFrame
void BeginFrame() override
Notify the zSpace SDK for the begining of a frame.
vtkZSpaceCoreSDKManager::UpdateViewAndProjectionMatrix
void UpdateViewAndProjectionMatrix() override
Update the zSpace view and projection matrix for each eye.
vtkZSpaceSDKManager
Abstract zSpace SDK manager class.
Definition: vtkZSpaceSDKManager.h:50
vtkX3D::position
@ position
Definition: vtkX3D.h:261
ZSMatrix4
Union representing 4x4 matrix (right-handed OpenGL column-major format). / This structure is used by ...
Definition: zSpaceTypes.h:80
vtkZSpaceSDKManager.h