VTK  9.3.20240329
vtkVRRay.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
10 #ifndef vtkVRRay_h
11 #define vtkVRRay_h
12 
13 #include "vtkNew.h" // for ivar
14 #include "vtkObject.h"
15 #include "vtkOpenGLHelper.h" // ivar
16 #include "vtkRenderingVRModule.h" // For export macro
17 
18 VTK_ABI_NAMESPACE_BEGIN
20 class vtkRenderWindow;
22 class vtkMatrix4x4;
23 
24 class VTKRENDERINGVR_EXPORT vtkVRRay : public vtkObject
25 {
26 public:
27  static vtkVRRay* New();
28  vtkTypeMacro(vtkVRRay, vtkObject);
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
32  void Render(vtkOpenGLRenderWindow* win, vtkMatrix4x4* poseMatrix);
33 
34  // show the model
35  vtkSetMacro(Show, bool);
36  vtkGetMacro(Show, bool);
37 
38  vtkSetMacro(Length, float);
39 
40  vtkSetVector3Macro(Color, float);
41 
43 
44 protected:
46  ~vtkVRRay() override;
47 
48  bool Show;
49  bool Loaded;
50 
54 
55  float Length;
56  float Color[3];
57 
58 private:
59  vtkVRRay(const vtkVRRay&) = delete;
60  void operator=(const vtkVRRay&) = delete;
61 };
62 
63 VTK_ABI_NAMESPACE_END
64 #endif
a simple class to control print indentation
Definition: vtkIndent.h:108
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:141
abstract base class for most VTK objects
Definition: vtkObject.h:162
OpenGL rendering window.
create a window for renderers to draw into
VR device model.
Definition: vtkVRRay.h:25
static vtkVRRay * New()
vtkOpenGLHelper RayHelper
Definition: vtkVRRay.h:51
vtkOpenGLVertexBufferObject * RayVBO
Definition: vtkVRRay.h:52
void ReleaseGraphicsResources(vtkRenderWindow *win)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkNew< vtkMatrix4x4 > PoseMatrix
Definition: vtkVRRay.h:53
~vtkVRRay() override
bool Loaded
Definition: vtkVRRay.h:49
void Render(vtkOpenGLRenderWindow *win, vtkMatrix4x4 *poseMatrix)
float Length
Definition: vtkVRRay.h:55
bool Show
Definition: vtkVRRay.h:48
bool Build(vtkOpenGLRenderWindow *win)
@ Color
Definition: vtkX3D.h:46