VTK
9.2.6
Main Page
Related Pages
Topics
Namespaces
Classes
Files
File List
File Members
Rendering
VR
vtkOpenGLAvatar.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkOpenGLAvatar.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 vtkOpenGLAvatar_h
24
#define vtkOpenGLAvatar_h
25
26
#include "
vtkAvatar.h
"
27
#include "
vtkNew.h
"
// for ivars
28
#include "vtkRenderingVRModule.h"
// For export macro
29
30
class
vtkOpenGLActor
;
31
class
vtkOpenGLPolyDataMapper
;
32
class
vtkOpenGLRenderer
;
33
class
vtkVRRay
;
34
class
vtkFlagpoleLabel
;
35
class
vtkTextProperty
;
36
37
class
VTKRENDERINGVR_EXPORT
vtkOpenGLAvatar
:
public
vtkAvatar
38
{
39
public
:
40
static
vtkOpenGLAvatar
*
New
();
41
vtkTypeMacro(
vtkOpenGLAvatar
,
vtkAvatar
);
42
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
43
47
int
RenderOpaqueGeometry
(
vtkViewport
* vp)
override
;
48
int
RenderTranslucentPolygonalGeometry
(
vtkViewport
* vp)
override
;
49
50
double
*
GetBounds
()
VTK_SIZEHINT
(6) override;
51
52
void
SetUseLeftHand(
bool
val) override;
53
void
SetUseRightHand(
bool
val) override;
54
void
SetShowHandsOnly(
bool
val) override;
55
56
// Set Ray parameters
57
void
SetLeftShowRay(
bool
v);
58
void
SetRightShowRay(
bool
v);
59
void
SetRayLength(
double
length);
60
61
void
SetLabel(const
char
* label);
62
vtkTextProperty
* GetLabelTextProperty();
63
64
protected:
65
vtkOpenGLAvatar
();
66
~
vtkOpenGLAvatar
() override;
67
68
// move the torso and arms based on head/hand inputs.
69
void
CalcBody();
70
71
vtkNew
<
vtkOpenGLPolyDataMapper
> HeadMapper;
72
vtkNew
<
vtkOpenGLActor
> HeadActor;
73
vtkNew
<
vtkOpenGLPolyDataMapper
> LeftHandMapper;
74
vtkNew
<
vtkOpenGLActor
> LeftHandActor;
75
vtkNew
<
vtkOpenGLPolyDataMapper
> RightHandMapper;
76
vtkNew
<
vtkOpenGLActor
> RightHandActor;
77
vtkNew
<
vtkOpenGLPolyDataMapper
> BodyMapper[NUM_BODY];
78
vtkNew
<
vtkOpenGLActor
> BodyActor[NUM_BODY];
79
80
vtkNew
<
vtkVRRay
> LeftRay;
81
vtkNew
<
vtkVRRay
> RightRay;
82
83
vtkNew
<
vtkFlagpoleLabel
> LabelActor;
84
85
private:
86
vtkOpenGLAvatar
(const
vtkOpenGLAvatar
&) = delete;
87
void
operator=(const
vtkOpenGLAvatar
&) = delete;
88
};
89
90
#endif
vtkAvatar
Renders head and hands for a user in VR.
Definition
vtkAvatar.h:33
vtkFlagpoleLabel
Renders a flagpole (line) with a label at the top that faces the camera.
Definition
vtkFlagpoleLabel.h:46
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:40
vtkNew
Allocate and hold a VTK object.
Definition
vtkNew.h:62
vtkOpenGLActor
OpenGL actor.
Definition
vtkOpenGLActor.h:35
vtkOpenGLAvatar
OpenGL Avatar.
Definition
vtkOpenGLAvatar.h:38
vtkOpenGLAvatar::New
static vtkOpenGLAvatar * New()
vtkOpenGLAvatar::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOpenGLAvatar::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *vp) override
Support the standard render methods.
vtkOpenGLAvatar::GetBounds
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
vtkOpenGLAvatar::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *vp) override
Actual Avatar render method.
vtkOpenGLPolyDataMapper
PolyDataMapper using OpenGL to render.
Definition
vtkOpenGLPolyDataMapper.h:59
vtkOpenGLRenderer
OpenGL renderer.
Definition
vtkOpenGLRenderer.h:52
vtkTextProperty
represent text properties.
Definition
vtkTextProperty.h:37
vtkVRRay
VR device model.
Definition
vtkVRRay.h:36
vtkViewport
abstract specification for Viewports
Definition
vtkViewport.h:56
vtkAvatar.h
vtkNew.h
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition
vtkWrappingHints.h:48
Generated on Sat Dec 14 2024 00:00:00 for VTK by
1.12.0