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 =========================================================================*/
29 #ifndef __vtkAngleRepresentation_h
30 #define __vtkAngleRepresentation_h
31 
33 
35 
36 
38 {
39 public:
41 
43  void PrintSelf(ostream& os, vtkIndent indent);
45 
48  virtual double GetAngle() = 0;
49 
51 
54  virtual void GetPoint1WorldPosition(double pos[3]) = 0;
55  virtual void GetCenterWorldPosition(double pos[3]) = 0;
56  virtual void GetPoint2WorldPosition(double pos[3]) = 0;
57  virtual void SetPoint1DisplayPosition(double pos[3]) = 0;
58  virtual void SetCenterDisplayPosition(double pos[3]) = 0;
59  virtual void SetPoint2DisplayPosition(double pos[3]) = 0;
60  virtual void GetPoint1DisplayPosition(double pos[3]) = 0;
61  virtual void GetCenterDisplayPosition(double pos[3]) = 0;
62  virtual void GetPoint2DisplayPosition(double pos[3]) = 0;
64 
66 
75  void SetHandleRepresentation(vtkHandleRepresentation *handle);
76  void InstantiateHandleRepresentation();
78 
80 
82  vtkGetObjectMacro(Point1Representation,vtkHandleRepresentation);
83  vtkGetObjectMacro(CenterRepresentation,vtkHandleRepresentation);
84  vtkGetObjectMacro(Point2Representation,vtkHandleRepresentation);
86 
88 
91  vtkSetClampMacro(Tolerance,int,1,100);
92  vtkGetMacro(Tolerance,int);
94 
96 
99  vtkSetStringMacro(LabelFormat);
100  vtkGetStringMacro(LabelFormat);
102 
104 
106  vtkSetMacro(Ray1Visibility,int);
107  vtkGetMacro(Ray1Visibility,int);
108  vtkBooleanMacro(Ray1Visibility,int);
109  vtkSetMacro(Ray2Visibility,int);
110  vtkGetMacro(Ray2Visibility,int);
111  vtkBooleanMacro(Ray2Visibility,int);
112  vtkSetMacro(ArcVisibility,int);
113  vtkGetMacro(ArcVisibility,int);
114  vtkBooleanMacro(ArcVisibility,int);
116 
117 //BTX -- used to communicate about the state of the representation
118  enum {Outside=0,NearP1,NearCenter,NearP2};
119 //ETX
120 
122 
123  virtual void BuildRepresentation();
124  virtual int ComputeInteractionState(int X, int Y, int modify=0);
125  virtual void StartWidgetInteraction(double e[2]);
126  virtual void CenterWidgetInteraction(double e[2]);
127  virtual void WidgetInteraction(double e[2]);
129 
130 protected:
133 
134  // The handle and the rep used to close the handles
139 
140  // Selection tolerance for the handles
142 
143  // Visibility of the various pieces of the representation
147 
148  // Format for the label
149  char *LabelFormat;
150 
151 private:
152  vtkAngleRepresentation(const vtkAngleRepresentation&); //Not implemented
153  void operator=(const vtkAngleRepresentation&); //Not implemented
154 };
155 
156 #endif
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract class for representing widget handles
virtual void StartWidgetInteraction(double eventPos[2])
vtkHandleRepresentation * HandleRepresentation
abstract class defines interface between the widget and widget representation classes ...
virtual void BuildRepresentation()=0
a simple class to control print indentation
Definition: vtkIndent.h:37
represent the vtkAngleWidget
virtual void WidgetInteraction(double newEventPos[2])
vtkHandleRepresentation * CenterRepresentation
#define VTK_WIDGETS_EXPORT
vtkHandleRepresentation * Point1Representation
void PrintSelf(ostream &os, vtkIndent indent)
vtkHandleRepresentation * Point2Representation