VTK
9.2.6
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Rendering
VR
vtkVRModel.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkVRModel.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
=========================================================================*/
25
#ifndef vtkVRModel_h
26
#define vtkVRModel_h
27
28
#include "
vtkNew.h
"
// for ivar
29
#include "
vtkObject.h
"
30
#include "
vtkOpenGLHelper.h
"
// ivar
31
#include "vtkRenderingVRModule.h"
// For export macro
32
33
class
vtkMatrix4x4
;
34
class
vtkOpenGLRenderWindow
;
35
class
vtkOpenGLVertexBufferObject
;
36
class
vtkTextureObject
;
37
class
vtkVRRay
;
38
39
class
VTKRENDERINGVR_EXPORT
vtkVRModel
:
public
vtkObject
40
{
41
public
:
42
vtkTypeMacro(
vtkVRModel
,
vtkObject
);
43
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
44
45
bool
Build(
vtkOpenGLRenderWindow
* win);
46
47
void
Render(
vtkOpenGLRenderWindow
* win,
vtkMatrix4x4
* poseInTrackingCoordinates);
48
49
const
std::string
&
GetName
()
const
{
return
this->ModelName; }
50
void
SetName
(
const
std::string
& modelName) { this->ModelName = modelName; }
51
52
// show the model
53
void
SetVisibility
(
bool
v) { this->Visibility = v; }
54
bool
GetVisibility
() {
return
this->Visibility; }
55
56
// Set Ray parameters
57
void
SetShowRay(
bool
v);
58
void
SetRayLength(
double
length
);
59
void
SetRayColor(
double
r,
double
g,
double
b);
60
vtkVRRay
*
GetRay
() {
return
this->Ray; }
61
62
void
ReleaseGraphicsResources(
vtkWindow
* win);
63
64
protected
:
65
vtkVRModel
();
66
~
vtkVRModel
()
override
;
67
68
virtual
void
FillModelHelper() = 0;
69
virtual
void
SetPositionAndTCoords() = 0;
70
virtual
void
CreateTextureObject(
vtkOpenGLRenderWindow
* win) = 0;
71
virtual
void
LoadModelAndTexture(
vtkOpenGLRenderWindow
* win) = 0;
72
73
std::string
ModelName
;
74
75
bool
Visibility
;
76
bool
Loaded
;
77
bool
FailedToLoad
;
78
79
vtkOpenGLHelper
ModelHelper
;
80
vtkOpenGLVertexBufferObject
*
ModelVBO
;
81
vtkNew<vtkTextureObject>
TextureObject
;
82
vtkNew<vtkMatrix4x4>
ModelToProjectionMatrix
;
83
84
// Controller ray
85
vtkNew<vtkVRRay>
Ray
;
86
87
private
:
88
vtkVRModel
(
const
vtkVRModel
&) =
delete
;
89
void
operator=(
const
vtkVRModel
&) =
delete
;
90
};
91
92
#endif
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition:
vtkOpenGLRenderWindow.h:56
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:62
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition:
vtkMatrix4x4.h:41
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkVRModel::ModelName
std::string ModelName
Definition:
vtkVRModel.h:73
vtkVRRay
VR device model.
Definition:
vtkVRRay.h:35
vtkX3D::length
Definition:
vtkX3D.h:399
vtkVRModel::TextureObject
vtkNew< vtkTextureObject > TextureObject
Definition:
vtkVRModel.h:81
vtkX3D::string
Definition:
vtkX3D.h:496
vtkVRModel::GetVisibility
bool GetVisibility()
Definition:
vtkVRModel.h:54
vtkVRModel::ModelHelper
vtkOpenGLHelper ModelHelper
Definition:
vtkVRModel.h:79
vtkVRModel
VR device model.
Definition:
vtkVRModel.h:39
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:38
vtkVRModel::Ray
vtkNew< vtkVRRay > Ray
Definition:
vtkVRModel.h:85
vtkVRModel::SetVisibility
void SetVisibility(bool v)
Definition:
vtkVRModel.h:53
vtkVRModel::ModelVBO
vtkOpenGLVertexBufferObject * ModelVBO
Definition:
vtkVRModel.h:80
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:39
vtkVRModel::GetRay
vtkVRRay * GetRay()
Definition:
vtkVRModel.h:60
vtkVRModel::Loaded
bool Loaded
Definition:
vtkVRModel.h:76
vtkVRModel::Visibility
bool Visibility
Definition:
vtkVRModel.h:75
vtkOpenGLHelper.h
vtkVRModel::FailedToLoad
bool FailedToLoad
Definition:
vtkVRModel.h:77
vtkNew.h
vtkTextureObject
abstracts an OpenGL texture object.
Definition:
vtkTextureObject.h:43
vtkOpenGLVertexBufferObject
Definition:
vtkOpenGLVertexBufferObject.h:40
vtkNew< vtkTextureObject >
vtkVRModel::GetName
const std::string & GetName() const
Definition:
vtkVRModel.h:49
vtkOpenGLHelper
Definition:
vtkOpenGLHelper.h:30
vtkVRModel::SetName
void SetName(const std::string &modelName)
Definition:
vtkVRModel.h:50
vtkObject.h
vtkVRModel::ModelToProjectionMatrix
vtkNew< vtkMatrix4x4 > ModelToProjectionMatrix
Definition:
vtkVRModel.h:82
Generated on Mon Oct 16 2023 11:19:56 for VTK by
1.8.10