VTK
9.6.2
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Rendering
OpenVR
vtkOpenVROverlayInternal.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 vtkPVOpenVROverlayInternal_h
5
#define vtkPVOpenVROverlayInternal_h
6
7
#include "
vtkInteractorStyle3D.h
"
8
#include "
vtkOpenVRCamera.h
"
9
#include "
vtkOpenVRRenderWindow.h
"
10
#include "
vtkRenderWindowInteractor.h
"
11
#include "
vtkVector.h
"
12
13
VTK_ABI_NAMESPACE_BEGIN
14
class
vtkOpenVRCameraPose
:
public
vtkVRCamera::Pose
15
{
16
public
:
17
bool
Loaded
=
false
;
18
19
void
Set
(
vtkOpenVRCamera
* cam,
vtkOpenVRRenderWindow
* win)
20
{
21
cam->
SetPoseFromCamera
(
this
, win);
22
this->Loaded =
true
;
23
}
24
25
void
Apply
(
vtkOpenVRCamera
* cam,
vtkOpenVRRenderWindow
* win)
26
{
27
cam->
ApplyPoseToCamera
(
this
, win);
28
}
29
};
30
31
class
vtkOpenVROverlaySpot
32
{
33
public
:
34
vtkOpenVROverlaySpot
(
int
x1,
int
x2,
int
y1,
int
y2,
vtkCommand
* cb)
35
{
36
this->
xmin
= x1;
37
this->
xmax
= x2;
38
this->
ymin
= y1;
39
this->
ymax
= y2;
40
this->
Callback
= cb;
41
cb->
Register
(
nullptr
);
42
this->
Active
=
false
;
43
}
44
~vtkOpenVROverlaySpot
()
45
{
46
if
(this->
Callback
)
47
{
48
this->
Callback
->Delete();
49
this->