VTK  9.2.5
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 
86 #ifndef vtkCompassWidget_h
87 #define vtkCompassWidget_h
88 
89 #include "vtkAbstractWidget.h"
90 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
91 #include "vtkGeovisCoreModule.h" // For export macro
92 
94 
95 class VTKGEOVISCORE_EXPORT vtkCompassWidget : public vtkAbstractWidget
96 {
97 public:
102 
104 
108  void PrintSelf(ostream& os, vtkIndent indent) override;
110 
117  {
118  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
119  }
120 
125 
127 
130  double GetHeading();
131  void SetHeading(double v);
132  double GetTilt();
133  void SetTilt(double value);
134  double GetDistance();
135  void SetDistance(double value);
137 
138 protected:
140  ~vtkCompassWidget() override = default;
141 
142  // These are the events that are handled
147 
150  {
151  Start = 0,
155  DistanceAdjusting
156  };
157 #if !defined(VTK_LEGACY_REMOVE)
158  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
160 #endif
161 
162  int TimerId;
164  double StartTime;
165 
166 private:
167  vtkCompassWidget(const vtkCompassWidget&) = delete;
168  void operator=(const vtkCompassWidget&) = delete;
169 };
170 
171 #endif
define the API for widget / widget representation
set a value by manipulating something
void SetTilt(double value)
Get the value for this widget.
~vtkCompassWidget() override=default
void SetRepresentation(vtkCompassRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
void SetHeading(double v)
Get the value for this widget.
double GetHeading()
Get the value for this widget.
static void EndSelectAction(vtkAbstractWidget *)
static vtkCompassWidget * New()
Instantiate the class.
static void TimerAction(vtkAbstractWidget *)
void SetDistance(double value)
Get the value for this widget.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros.
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
double GetDistance()
Get the value for this widget.
double GetTilt()
Get the value for this widget.
static void MoveAction(vtkAbstractWidget *)
static void SelectAction(vtkAbstractWidget *)
a simple class to control print indentation
Definition: vtkIndent.h:119
abstract class defines interface between the widget and widget representation classes
@ value
Definition: vtkX3D.h:226
#define VTK_DEPRECATED_IN_9_2_0(reason)