VTK
vtkAngleRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAngleRepresentation.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 =========================================================================*/
30 #ifndef vtkAngleRepresentation_h
31 #define vtkAngleRepresentation_h
32 
33 #include "vtkInteractionWidgetsModule.h" // For export macro
35 
37 
38 
39 class VTKINTERACTIONWIDGETS_EXPORT vtkAngleRepresentation : public vtkWidgetRepresentation
40 {
41 public:
43 
47  void PrintSelf(ostream& os, vtkIndent indent);
49 
54  virtual double GetAngle() = 0;
55 
57 
62  virtual void GetPoint1WorldPosition(double pos[3]) = 0;
63  virtual void GetCenterWorldPosition(double pos[3]) = 0;
64  virtual void GetPoint2WorldPosition(double pos[3]) = 0;
65  virtual void SetPoint1DisplayPosition(double pos[3]) = 0;
66  virtual void SetCenterDisplayPosition(double pos[3]) = 0;
67  virtual void SetPoint2DisplayPosition(double pos[3]) = 0;
68  virtual void GetPoint1DisplayPosition(double pos[3]) = 0;
69  virtual void GetCenterDisplayPosition(double pos[3]) = 0;
70  virtual void GetPoint2DisplayPosition(double pos[3]) = 0;
72 
74 
87 
89 
92  vtkGetObjectMacro(Point1Representation,vtkHandleRepresentation);
93  vtkGetObjectMacro(CenterRepresentation,vtkHandleRepresentation);
94  vtkGetObjectMacro(Point2Representation,vtkHandleRepresentation);
96 
98 
103  vtkSetClampMacro(Tolerance,int,1,100);
104  vtkGetMacro(Tolerance,int);
106 
108 
113  vtkSetStringMacro(LabelFormat);
114  vtkGetStringMacro(LabelFormat);
116 
118 
122  vtkSetMacro(Ray1Visibility,int);
123  vtkGetMacro(Ray1Visibility,int);
124  vtkBooleanMacro(Ray1Visibility,int);
125  vtkSetMacro(Ray2Visibility,int);
126  vtkGetMacro(Ray2Visibility,int);
127  vtkBooleanMacro(Ray2Visibility,int);
128  vtkSetMacro(ArcVisibility,int);
129  vtkGetMacro(ArcVisibility,int);
130  vtkBooleanMacro(ArcVisibility,int);
132 
133  // Used to communicate about the state of the representation
134  enum {Outside=0,NearP1,NearCenter,NearP2};
135 
137 
140  virtual void BuildRepresentation();
141  virtual int ComputeInteractionState(int X, int Y, int modify=0);
142  virtual void StartWidgetInteraction(double e[2]);
143  virtual void CenterWidgetInteraction(double e[2]);
144  virtual void WidgetInteraction(double e[2]);
146 
147 protected:
150 
151  // The handle and the rep used to close the handles
156 
157  // Selection tolerance for the handles
159 
160  // Visibility of the various pieces of the representation
164 
165  // Format for the label
166  char *LabelFormat;
167 
168 private:
169  vtkAngleRepresentation(const vtkAngleRepresentation&) VTK_DELETE_FUNCTION;
170  void operator=(const vtkAngleRepresentation&) VTK_DELETE_FUNCTION;
171 };
172 
173 #endif
vtkWidgetRepresentation.h
vtkAngleRepresentation::CenterRepresentation
vtkHandleRepresentation * CenterRepresentation
Definition: vtkAngleRepresentation.h:154
vtkAngleRepresentation::StartWidgetInteraction
virtual void StartWidgetInteraction(double e[2])
vtkAngleRepresentation::CenterWidgetInteraction
virtual void CenterWidgetInteraction(double e[2])
vtkAngleRepresentation::GetCenterDisplayPosition
virtual void GetCenterDisplayPosition(double pos[3])=0
vtkAngleRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkAngleRepresentation::SetPoint2DisplayPosition
virtual void SetPoint2DisplayPosition(double pos[3])=0
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:55
vtkAngleRepresentation::Point1Representation
vtkHandleRepresentation * Point1Representation
Definition: vtkAngleRepresentation.h:153
vtkHandleRepresentation
abstract class for representing widget handles
Definition: vtkHandleRepresentation.h:59
vtkAngleRepresentation::GetAngle
virtual double GetAngle()=0
This representation and all subclasses must keep an angle (in degrees) consistent with the state of t...
vtkAngleRepresentation::Point2Representation
vtkHandleRepresentation * Point2Representation
Definition: vtkAngleRepresentation.h:155
vtkAngleRepresentation::InstantiateHandleRepresentation
void InstantiateHandleRepresentation()
vtkAngleRepresentation::BuildRepresentation
virtual void BuildRepresentation()
These are methods that satisfy vtkWidgetRepresentation's API.
vtkAngleRepresentation::ComputeInteractionState
virtual int ComputeInteractionState(int X, int Y, int modify=0)
vtkAngleRepresentation::WidgetInteraction
virtual void WidgetInteraction(double e[2])
vtkAngleRepresentation::~vtkAngleRepresentation
~vtkAngleRepresentation()
vtkAngleRepresentation::GetPoint2WorldPosition
virtual void GetPoint2WorldPosition(double pos[3])=0
vtkAngleRepresentation::Tolerance
int Tolerance
Definition: vtkAngleRepresentation.h:158
vtkAngleRepresentation::LabelFormat
char * LabelFormat
Definition: vtkAngleRepresentation.h:166
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkAngleRepresentation::SetPoint1DisplayPosition
virtual void SetPoint1DisplayPosition(double pos[3])=0
vtkAngleRepresentation::vtkAngleRepresentation
vtkAngleRepresentation()
vtkAngleRepresentation::GetPoint1DisplayPosition
virtual void GetPoint1DisplayPosition(double pos[3])=0
vtkAngleRepresentation::GetPoint2DisplayPosition
virtual void GetPoint2DisplayPosition(double pos[3])=0
vtkAngleRepresentation::HandleRepresentation
vtkHandleRepresentation * HandleRepresentation
Definition: vtkAngleRepresentation.h:152
vtkAngleRepresentation::GetCenterWorldPosition
virtual void GetCenterWorldPosition(double pos[3])=0
vtkAngleRepresentation::SetHandleRepresentation
void SetHandleRepresentation(vtkHandleRepresentation *handle)
This method is used to specify the type of handle representation to use for the three internal vtkHan...
vtkAngleRepresentation::Ray1Visibility
int Ray1Visibility
Definition: vtkAngleRepresentation.h:161
vtkAngleRepresentation::SetCenterDisplayPosition
virtual void SetCenterDisplayPosition(double pos[3])=0
vtkAngleRepresentation
represent the vtkAngleWidget
Definition: vtkAngleRepresentation.h:40
vtkAngleRepresentation::ArcVisibility
int ArcVisibility
Definition: vtkAngleRepresentation.h:163
vtkAngleRepresentation::GetPoint1WorldPosition
virtual void GetPoint1WorldPosition(double pos[3])=0
Methods to Set/Get the coordinates of the three points defining this representation.
vtkAngleRepresentation::Ray2Visibility
int Ray2Visibility
Definition: vtkAngleRepresentation.h:162