VTK  9.2.6
vtkVRRay.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkVRRay.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 =========================================================================*/
22 #ifndef vtkVRRay_h
23 #define vtkVRRay_h
24 
25 #include "vtkNew.h" // for ivar
26 #include "vtkObject.h"
27 #include "vtkOpenGLHelper.h" // ivar
28 #include "vtkRenderingVRModule.h" // For export macro
29 
31 class vtkRenderWindow;
33 class vtkMatrix4x4;
34 
35 class VTKRENDERINGVR_EXPORT vtkVRRay : public vtkObject
36 {
37 public:
38  static vtkVRRay* New();
39  vtkTypeMacro(vtkVRRay, vtkObject);
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
42  bool Build(vtkOpenGLRenderWindow* win);
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 
53  void ReleaseGraphicsResources(vtkRenderWindow* win);
54 
55 protected:
56  vtkVRRay();
57  ~vtkVRRay() override;
58 
59  bool Show;
60  bool Loaded;
61 
65 
66  float Length;
67  float Color[3];
68 
69 private:
70  vtkVRRay(const vtkVRRay&) = delete;
71  void operator=(const vtkVRRay&) = delete;
72 };
73 
74 #endif
OpenGL rendering window.
vtkOpenGLHelper RayHelper
Definition: vtkVRRay.h:62
abstract base class for most VTK objects
Definition: vtkObject.h:62
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
VR device model.
Definition: vtkVRRay.h:35
bool Show
Definition: vtkVRRay.h:59
float Length
Definition: vtkVRRay.h:66
bool Loaded
Definition: vtkVRRay.h:60
vtkOpenGLVertexBufferObject * RayVBO
Definition: vtkVRRay.h:63
a simple class to control print indentation
Definition: vtkIndent.h:39
create a window for renderers to draw into
vtkNew< vtkMatrix4x4 > PoseMatrix
Definition: vtkVRRay.h:64
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...