VTK
vtkOculusRenderWindowInteractor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOculusRenderWindowInteractor.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
23 #ifndef vtkOculusRenderWindowInteractor_h
24 #define vtkOculusRenderWindowInteractor_h
25 
26 #include "vtkRenderingOculusModule.h" // For export macro
28 
29 #include "vtkOculusRenderWindow.h" // ivars
30 #include "vtkNew.h" // ivars
31 #include "vtkTransform.h" // ivars
32 
33 class VTKRENDERINGOCULUS_EXPORT vtkOculusRenderWindowInteractor : public vtkRenderWindowInteractor3D
34 {
35 public:
40 
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
47  virtual void Initialize();
48 
54  void TerminateApp(void);
55 
57 
63  static void SetClassExitMethod(void (*f)(void *), void *arg);
64  static void SetClassExitMethodArgDelete(void (*f)(void *));
66 
71  virtual void ExitCallback();
72 
74 
78  virtual void SetPhysicalTranslation(vtkCamera *, double, double, double);
79  virtual double *GetPhysicalTranslation(vtkCamera *);
81 
82 protected:
85 
87 
92  static void (*ClassExitMethod)(void *);
93  static void (*ClassExitMethodArgDelete)(void *);
94  static void *ClassExitMethodArg;
96 
98 
102  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
103  virtual int InternalDestroyTimer(int platformTimerId);
105 
111  virtual void StartEventLoop();
112 
114 
115 private:
117  void operator=(const vtkOculusRenderWindowInteractor&); // Not implemented.
118 };
119 
120 #endif
virtual void SetPhysicalTranslation(vtkCamera *, double, double, double)
Set/Get the optional scale translation to map world coordinates into the 3D physical space (meters,...
implements Oculus specific functions required by vtkRenderWindowInteractor.
virtual int InternalDestroyTimer(int platformTimerId)
Internal methods for creating and destroying timers that must be implemented by subclasses.
virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration)
Internal methods for creating and destroying timers that must be implemented by subclasses.
adds support for 3D events to vtkRenderWindowInteractor.
void TerminateApp(void) override
OpenVR specific application terminate, calls ClassExitMethod then calls PostQuitMessage(0) to termina...
virtual double * GetPhysicalTranslation(vtkCamera *)
Set/Get the optional scale translation to map world coordinates into the 3D physical space (meters,...
virtual void Initialize()
Prepare for handling events and set the Enabled flag to true.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual void ExitCallback()
These methods correspond to the Exit, User and Pick callbacks.
a virtual camera for 3D rendering
Definition: vtkCamera.h:44
virtual void StartEventLoop()
Run the event loop (does not return until TerminateApp is called).
static void * ClassExitMethodArg
Class variables so an exit method can be defined for this class (used to set different exit methods f...
static vtkRenderWindowInteractor3D * New()
Construct object so that light follows camera motion.