VTK  9.2.6
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 
67 #ifndef vtkCompassWidget_h
68 #define vtkCompassWidget_h
69 
70 #include "vtkAbstractWidget.h"
71 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
72 #include "vtkGeovisCoreModule.h" // For export macro
73 
75 
76 class VTKGEOVISCORE_EXPORT vtkCompassWidget : public vtkAbstractWidget
77 {
78 public:
82  static vtkCompassWidget* New();
83 
85 
89  void PrintSelf(ostream& os, vtkIndent indent) override;
91 
98  {
99  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
100  }
101 
105  void CreateDefaultRepresentation() override;
106 
108 
111  double GetHeading();
112  void SetHeading(double v);
113  double GetTilt();
114  void SetTilt(double value);
115  double GetDistance();
116  void SetDistance(double value);
118 
119 protected:
121  ~vtkCompassWidget() override = default;
122 
123  // These are the events that are handled
124  static void SelectAction(vtkAbstractWidget*);
125  static void EndSelectAction(vtkAbstractWidget*);
126  static void MoveAction(vtkAbstractWidget*);
127  static void TimerAction(vtkAbstractWidget*);
128 
131  {
132  Start = 0,
136  DistanceAdjusting
137  };
138 #if !defined(VTK_LEGACY_REMOVE)
139  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
141 #endif
142 
143  int TimerId;
145  double StartTime;
146 
147 private:
148  vtkCompassWidget(const vtkCompassWidget&) = delete;
149  void operator=(const vtkCompassWidget&) = delete;
150 };
151 
152 #endif
void SetRepresentation(vtkCompassRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene...
#define VTK_DEPRECATED_IN_9_2_0(reason)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
a simple class to control print indentation
Definition: vtkIndent.h:39
define the API for widget / widget representation
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
set a value by manipulating something