VTK
vtkAngleWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAngleWidget.h,v
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 =========================================================================*/
79 #ifndef vtkAngleWidget_h
80 #define vtkAngleWidget_h
81 
82 #include "vtkInteractionWidgetsModule.h" // For export macro
83 #include "vtkAbstractWidget.h"
84 
86 class vtkHandleWidget;
87 class vtkAngleWidgetCallback;
88 
89 
91 {
92 public:
94  static vtkAngleWidget *New();
95 
97 
99  void PrintSelf(ostream& os, vtkIndent indent);
101 
105  virtual void SetEnabled(int);
106 
108 
112  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
114 
117 
119 
121  {return reinterpret_cast<vtkAngleRepresentation*>(this->WidgetRep);}
123 
126  int IsAngleValid();
127 
130  virtual void SetProcessEvents(int);
131 
133 
137  enum {Start=0,Define,Manipulate};
138  //ETX
140 
142 
150  virtual void SetWidgetStateToStart();
151  virtual void SetWidgetStateToManipulate();
153 
155 
156  virtual int GetWidgetState()
157  {return this->WidgetState;}
159 
160 protected:
161  vtkAngleWidget();
162  ~vtkAngleWidget();
163 
164  // The state of the widget
167 
168  // Callback interface to capture events when
169  // placing the widget.
170  static void AddPointAction(vtkAbstractWidget*);
171  static void MoveAction(vtkAbstractWidget*);
172  static void EndSelectAction(vtkAbstractWidget*);
173 
174  // The positioning handle widgets
178  vtkAngleWidgetCallback *AngleWidgetCallback1;
179  vtkAngleWidgetCallback *AngleWidgetCenterCallback;
180  vtkAngleWidgetCallback *AngleWidgetCallback2;
181 
182  // Methods invoked when the handles at the
183  // end points of the widget are manipulated
184  void StartAngleInteraction(int handleNum);
185  void AngleInteraction(int handleNum);
186  void EndAngleInteraction(int handleNum);
187 
188 //BTX
189  friend class vtkAngleWidgetCallback;
190 //ETX
191 
192 private:
193  vtkAngleWidget(const vtkAngleWidget&); //Not implemented
194  void operator=(const vtkAngleWidget&); //Not implemented
195 };
196 
197 #endif
vtkAngleWidgetCallback * AngleWidgetCenterCallback
void PrintSelf(ostream &os, vtkIndent indent)
void SetRepresentation(vtkAngleRepresentation *r)
virtual void SetProcessEvents(int)
vtkAngleRepresentation * GetAngleRepresentation()
a general widget for moving handles
vtkAngleWidgetCallback * AngleWidgetCallback2
virtual void CreateDefaultRepresentation()=0
vtkWidgetRepresentation * WidgetRep
vtkHandleWidget * Point1Widget
#define VTKINTERACTIONWIDGETS_EXPORT
vtkHandleWidget * CenterWidget
a simple class to control print indentation
Definition: vtkIndent.h:38
represent the vtkAngleWidget
measure the angle between two rays (defined by three points)
vtkAngleWidgetCallback * AngleWidgetCallback1
define the API for widget / widget representation
vtkHandleWidget * Point2Widget
static vtkObject * New()
virtual void SetEnabled(int)
virtual int GetWidgetState()