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 
67 #ifndef __vtkCompassWidget_h
68 #define __vtkCompassWidget_h
69 
70 #include "vtkAbstractWidget.h"
71 
73 
74 
76 {
77 public:
79  static vtkCompassWidget *New();
80 
82 
84  void PrintSelf(ostream& os, vtkIndent indent);
86 
88 
91  void SetRepresentation(vtkCompassRepresentation *r)
92  {this->Superclass::SetWidgetRepresentation
93  (reinterpret_cast<vtkWidgetRepresentation*>(r));}
95 
98 
100 
101  double GetHeading();
102  void SetHeading(double v);
103  double GetTilt();
104  void SetTilt(double t);
105  double GetDistance();
106  void SetDistance(double t);
108 
109 protected:
112 
113  // These are the events that are handled
114  static void SelectAction(vtkAbstractWidget*);
115  static void EndSelectAction(vtkAbstractWidget*);
116  static void MoveAction(vtkAbstractWidget*);
117  static void TimerAction(vtkAbstractWidget*);
118 
119 //BTX - manage the state of the widget
122  {
123  Start=0,
127  DistanceAdjusting
128  };
129 //ETX
130 
131  int TimerId;
133  double StartTime;
134 
135 private:
136  vtkCompassWidget(const vtkCompassWidget&); //Not implemented
137  void operator=(const vtkCompassWidget&); //Not implemented
138 };
139 
140 #endif