VTK  9.2.6
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=========================================================================*/
22
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
30class vtkOpenGLActor;
33class vtkVRRay;
35class vtkTextProperty;
36
37class VTKRENDERINGVR_EXPORT vtkOpenGLAvatar : public vtkAvatar
38{
39public:
41 vtkTypeMacro(vtkOpenGLAvatar, vtkAvatar);
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
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);
63
64protected:
66 ~vtkOpenGLAvatar() override;
67
68 // move the torso and arms based on head/hand inputs.
69 void CalcBody();
70
79
82
84
85private:
86 vtkOpenGLAvatar(const vtkOpenGLAvatar&) = delete;
87 void operator=(const vtkOpenGLAvatar&) = delete;
88};
89
90#endif
Renders a flagpole (line) with a label at the top that faces the camera.
a simple class to control print indentation
Definition vtkIndent.h:34
Allocate and hold a VTK object.
Definition vtkNew.h:56
OpenGL actor.
vtkNew< vtkOpenGLActor > RightHandActor
vtkNew< vtkOpenGLActor > HeadActor
static vtkOpenGLAvatar * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetLabel(const char *label)
void SetRayLength(double length)
int RenderTranslucentPolygonalGeometry(vtkViewport *vp) override
Support the standard render methods.
vtkNew< vtkOpenGLPolyDataMapper > LeftHandMapper
vtkNew< vtkOpenGLPolyDataMapper > RightHandMapper
vtkNew< vtkVRRay > RightRay
vtkNew< vtkOpenGLPolyDataMapper > HeadMapper
void SetLeftShowRay(bool v)
void SetUseRightHand(bool val) override
Normally, hand position/orientation is set explicitly.
vtkNew< vtkOpenGLActor > BodyActor[NUM_BODY]
vtkNew< vtkVRRay > LeftRay
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
vtkNew< vtkFlagpoleLabel > LabelActor
vtkNew< vtkOpenGLActor > LeftHandActor
void SetUseLeftHand(bool val) override
Normally, hand position/orientation is set explicitly.
int RenderOpaqueGeometry(vtkViewport *vp) override
Actual Avatar render method.
vtkNew< vtkOpenGLPolyDataMapper > BodyMapper[NUM_BODY]
void SetShowHandsOnly(bool val) override
Show just the hands.
vtkTextProperty * GetLabelTextProperty()
void SetRightShowRay(bool v)
PolyDataMapper using OpenGL to render.
OpenGL renderer.
represent text properties.
VR device model.
Definition vtkVRRay.h:36
abstract specification for Viewports
Definition vtkViewport.h:50
#define VTK_SIZEHINT(...)