VTK  9.2.5
vtkOpenVROverlayInternal.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4
5 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6 All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14
15#ifndef vtkPVOpenVROverlayInternal_h
16#define vtkPVOpenVROverlayInternal_h
17
19#include "vtkOpenVRCamera.h"
22#include "vtkVectorOperators.h"
23
25{
26public:
27 bool Loaded = false;
28
30 {
31 cam->SetPoseFromCamera(this, win);
32 this->Loaded = true;
33 }
34
36 {
37 cam->ApplyPoseToCamera(this, win);
38 }
39};
40
42{
43public:
44 vtkOpenVROverlaySpot(int x1, int x2, int y1, int y2, vtkCommand* cb)
45 {
46 this->xmin = x1;
47 this->xmax = x2;
48 this->ymin = y1;
49 this->ymax = y2;
50 this->Callback = cb;
51 cb->Register(nullptr);
52 this->Active = false;
53 }
55 {
56 if (this->Callback)
57 {
58 this->Callback->Delete();
59 this->Callback = nullptr;
60 }
61 }
62 bool Active;
63 int xmin;
64 int xmax;
65 int ymin;
66 int ymax;
68 std::string Group;
70
72 {
73 this->xmin = in.xmin;
74 this->xmax = in.xmax;
75 this->ymin = in.ymin;
76 this->ymax = in.ymax;
77 this->Callback = in.Callback;
78 this->Callback->Register(0);
79 this->Active = in.Active;
80 this->Group = in.Group;
81 this->GroupId = in.GroupId;
82 }
84};
85
86#endif // vtkPVOpenVROverlayInternal_h
87
88//****************************************************************************
89// VTK-HeaderTest-Exclude: vtkOpenVROverlayInternal.h
superclass for callback/observer methods
Definition: vtkCommand.h:395
virtual void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).
virtual void Delete()
Delete a VTK object.
void Set(vtkOpenVRCamera *cam, vtkOpenVRRenderWindow *win)
void Apply(vtkOpenVRCamera *cam, vtkOpenVRRenderWindow *win)
OpenVR camera.
vtkOpenVROverlaySpot & operator=(const vtkOpenVROverlaySpot &)=delete
vtkOpenVROverlaySpot(int x1, int x2, int y1, int y2, vtkCommand *cb)
vtkOpenVROverlaySpot(const vtkOpenVROverlaySpot &in)
OpenVR rendering window.
void SetPoseFromCamera(Pose *pose, vtkVRRenderWindow *win)
void ApplyPoseToCamera(Pose *pose, vtkVRRenderWindow *win)