VTK  9.0.1
vtkOpenVRRay.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 =========================================================================*/
21 #ifndef vtkOpenVRRay_h
22 #define vtkOpenVRRay_h
23 
24 #include "vtkNew.h" // for ivar
25 #include "vtkObject.h"
26 #include "vtkOpenGLHelper.h" // ivar
27 #include "vtkRenderingOpenVRModule.h" // For export macro
28 #include <openvr.h> // for ivars
29 
31 class vtkRenderWindow;
33 class vtkMatrix4x4;
34 
35 class VTKRENDERINGOPENVR_EXPORT vtkOpenVRRay : public vtkObject
36 {
37 public:
38  static vtkOpenVRRay* New();
39  vtkTypeMacro(vtkOpenVRRay, vtkObject);
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43  void Render(vtkOpenGLRenderWindow* win, vtkMatrix4x4* poseMatrix);
44 
45  // show the model
46  vtkSetMacro(Show, bool);
47  vtkGetMacro(Show, bool);
48 
49  vtkSetMacro(Length, float);
50 
51  vtkSetVector3Macro(Color, float);
52 
54 
55 protected:
57  ~vtkOpenVRRay() override;
58 
59  bool Show;
60  bool Loaded;
61 
65 
66  float Length;
67  float Color[3];
68 
69 private:
70  vtkOpenVRRay(const vtkOpenVRRay&) = delete;
71  void operator=(const vtkOpenVRRay&) = delete;
72 };
73 
74 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:36
abstract base class for most VTK objects
Definition: vtkObject.h:63
OpenGL rendering window.
OpenVR device model.
Definition: vtkOpenVRRay.h:36
bool Build(vtkOpenGLRenderWindow *win)
void Render(vtkOpenGLRenderWindow *win, vtkMatrix4x4 *poseMatrix)
vtkOpenGLVertexBufferObject * RayVBO
Definition: vtkOpenVRRay.h:63
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkNew< vtkMatrix4x4 > PoseMatrix
Definition: vtkOpenVRRay.h:64
static vtkOpenVRRay * New()
void ReleaseGraphicsResources(vtkRenderWindow *win)
~vtkOpenVRRay() override
vtkOpenGLHelper RayHelper
Definition: vtkOpenVRRay.h:62
create a window for renderers to draw into
@ Color
Definition: vtkX3D.h:52