VTK
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 
21 
65 #ifndef vtkCompassWidget_h
66 #define vtkCompassWidget_h
67 
68 #include "vtkGeovisCoreModule.h" // For export macro
69 #include "vtkAbstractWidget.h"
70 
72 
73 
74 class VTKGEOVISCORE_EXPORT vtkCompassWidget : public vtkAbstractWidget
75 {
76 public:
80  static vtkCompassWidget *New();
81 
83 
87  void PrintSelf(ostream& os, vtkIndent indent);
89 
96  {this->Superclass::SetWidgetRepresentation
97  (reinterpret_cast<vtkWidgetRepresentation*>(r));}
98 
103 
105 
108  double GetHeading();
109  void SetHeading(double v);
110  double GetTilt();
111  void SetTilt(double t);
112  double GetDistance();
113  void SetDistance(double t);
115 
116 protected:
119 
120  // These are the events that are handled
125 
128  {
129  Start=0,
133  DistanceAdjusting
134  };
135 
136  int TimerId;
138  double StartTime;
139 
140 private:
141  vtkCompassWidget(const vtkCompassWidget&) VTK_DELETE_FUNCTION;
142  void operator=(const vtkCompassWidget&) VTK_DELETE_FUNCTION;
143 };
144 
145 #endif
define the API for widget / widget representation
set a value by manipulating something
void SetTilt(double t)
void SetRepresentation(vtkCompassRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
void SetHeading(double v)
double GetHeading()
Get the value for this widget.
static void EndSelectAction(vtkAbstractWidget *)
static vtkCompassWidget * New()
Instantiate the class.
static void TimerAction(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void CreateDefaultRepresentation()
Create the default widget representation if one is not set.
double GetDistance()
void SetDistance(double t)
static void MoveAction(vtkAbstractWidget *)
static void SelectAction(vtkAbstractWidget *)
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract class defines interface between the widget and widget representation classes