VTK
9.1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Geovis
Core
vtkCompassWidget.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkCompassWidget.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
=========================================================================*/
15
/*-------------------------------------------------------------------------
16
Copyright 2008 Sandia Corporation.
17
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18
the U.S. Government retains certain rights in this software.
19
-------------------------------------------------------------------------*/
20
83
#ifndef vtkCompassWidget_h
84
#define vtkCompassWidget_h
85
86
#include "
vtkAbstractWidget.h
"
87
#include "vtkGeovisCoreModule.h"
// For export macro
88
89
class
vtkCompassRepresentation
;
90
91
class
VTKGEOVISCORE_EXPORT
vtkCompassWidget
:
public
vtkAbstractWidget
92
{
93
public
:
97
static
vtkCompassWidget
*
New
();
98
100
103
vtkTypeMacro(
vtkCompassWidget
,
vtkAbstractWidget
);
104
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
106
112
void
SetRepresentation
(
vtkCompassRepresentation
* r)
113
{
114
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
115
}
116
120
void
CreateDefaultRepresentation
()
override
;
121
123
126
double
GetHeading
();
127
void
SetHeading
(
double
v);
128
double
GetTilt
();
129
void
SetTilt
(
double
value
);
130
double
GetDistance
();
131
void
SetDistance
(
double
value
);
133
134
protected
:
135
vtkCompassWidget
();
136
~vtkCompassWidget
()
override
=
default
;
137
138
// These are the events that are handled
139
static
void
SelectAction
(
vtkAbstractWidget
*);
140
static
void
EndSelectAction
(
vtkAbstractWidget
*);
141
static
void
MoveAction
(
vtkAbstractWidget
*);
142
static
void
TimerAction
(
vtkAbstractWidget
*);
143
144
int
WidgetState
;
145
enum
_WidgetState
146
{
147
Start = 0,
148
Highlighting
,
149
Adjusting
,
150
TiltAdjusting
,
151
DistanceAdjusting
152
};
153
154
int
TimerId
;
155
int
TimerDuration
;
156
double
StartTime
;
157
158
private
:
159
vtkCompassWidget
(
const
vtkCompassWidget
&) =
delete
;
160
void
operator=(
const
vtkCompassWidget
&) =
delete
;
161
};
162
163
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:63
vtkCompassRepresentation
provide a compass
Definition:
vtkCompassRepresentation.h:73
vtkCompassWidget
set a value by manipulating something
Definition:
vtkCompassWidget.h:92
vtkCompassWidget::SetTilt
void SetTilt(double value)
Get the value for this widget.
vtkCompassWidget::~vtkCompassWidget
~vtkCompassWidget() override=default
vtkCompassWidget::SetRepresentation
void SetRepresentation(vtkCompassRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition:
vtkCompassWidget.h:112
vtkCompassWidget::SetHeading
void SetHeading(double v)
Get the value for this widget.
vtkCompassWidget::GetHeading
double GetHeading()
Get the value for this widget.
vtkCompassWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkCompassWidget::TimerAction
static void TimerAction(vtkAbstractWidget *)
vtkCompassWidget::TimerId
int TimerId
Definition:
vtkCompassWidget.h:154
vtkCompassWidget::New
static vtkCompassWidget * New()
Instantiate the class.
vtkCompassWidget::_WidgetState
_WidgetState
Definition:
vtkCompassWidget.h:146
vtkCompassWidget::TiltAdjusting
@ TiltAdjusting
Definition:
vtkCompassWidget.h:150
vtkCompassWidget::Highlighting
@ Highlighting
Definition:
vtkCompassWidget.h:148
vtkCompassWidget::Adjusting
@ Adjusting
Definition:
vtkCompassWidget.h:149
vtkCompassWidget::SetDistance
void SetDistance(double value)
Get the value for this widget.
vtkCompassWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
vtkCompassWidget::vtkCompassWidget
vtkCompassWidget()
vtkCompassWidget::StartTime
double StartTime
Definition:
vtkCompassWidget.h:156
vtkCompassWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkCompassWidget::GetDistance
double GetDistance()
Get the value for this widget.
vtkCompassWidget::GetTilt
double GetTilt()
Get the value for this widget.
vtkCompassWidget::WidgetState
int WidgetState
Definition:
vtkCompassWidget.h:144
vtkCompassWidget::TimerDuration
int TimerDuration
Definition:
vtkCompassWidget.h:155
vtkCompassWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkCompassWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition:
vtkWidgetRepresentation.h:60
vtkX3D::value
@ value
Definition:
vtkX3D.h:226
vtkAbstractWidget.h
Generated on Sat Feb 25 2023 08:59:35 for VTK by
1.9.4