VTK  9.4.20241012
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
8#include "vtkOpenVRCamera.h"
11#include "vtkVector.h"
12
13VTK_ABI_NAMESPACE_BEGIN
15{
16public:
17 bool Loaded = false;
18
20 {
21 cam->SetPoseFromCamera(this, win);
22 this->Loaded = true;
23 }
24
26 {
27 cam->ApplyPoseToCamera(this, win);
28 }
29};
30
32{
33public:
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 }
45 {
46 if (this->Callback)
47 {
48 this->Callback->Delete();
49 this->Callback = nullptr;
50 }
51 }
52 bool Active;
53 int xmin;
54 int xmax;
55 int ymin;
56 int ymax;
58 std::string Group;
60
62 {
63 this->xmin = in.xmin;
64 this->xmax = in.xmax;
65 this->ymin = in.ymin;
66 this->ymax = in.ymax;
67 this->Callback = in.Callback;
68 this->Callback->Register(nullptr);
69 this->Active = in.Active;
70 this->Group = in.Group;
71 this->GroupId = in.GroupId;
72 }
74};
75
76VTK_ABI_NAMESPACE_END
77#endif // vtkPVOpenVROverlayInternal_h
78
79//****************************************************************************
80// VTK-HeaderTest-Exclude: vtkOpenVROverlayInternal.h
superclass for callback/observer methods
Definition vtkCommand.h:384
virtual void Delete()
Delete a VTK object.
void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another 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)