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 
32 #include "vtkInteractionWidgetsModule.h" // For export macro
34 
36 
37 
39 {
40 public:
42 
44  void PrintSelf(ostream& os, vtkIndent indent);
46 
49  virtual double GetAngle() = 0;
50 
52 
55  virtual void GetPoint1WorldPosition(double pos[3]) = 0;
56  virtual void GetCenterWorldPosition(double pos[3]) = 0;
57  virtual void GetPoint2WorldPosition(double pos[3]) = 0;
58  virtual void SetPoint1DisplayPosition(double pos[3]) = 0;
59  virtual void SetCenterDisplayPosition(double pos[3]) = 0;
60  virtual void SetPoint2DisplayPosition(double pos[3]) = 0;
61  virtual void GetPoint1DisplayPosition(double pos[3]) = 0;
62  virtual void GetCenterDisplayPosition(double pos[3]) = 0;
63  virtual void GetPoint2DisplayPosition(double pos[3]) = 0;
65 
67 
79 
81 
87 
89 
92  vtkSetClampMacro(Tolerance,int,1,100);
93  vtkGetMacro(Tolerance,int);
95 
97 
100  vtkSetStringMacro(LabelFormat);
101  vtkGetStringMacro(LabelFormat);
103 
105 
107  vtkSetMacro(Ray1Visibility,int);
108  vtkGetMacro(Ray1Visibility,int);
109  vtkBooleanMacro(Ray1Visibility,int);
110  vtkSetMacro(Ray2Visibility,int);
111  vtkGetMacro(Ray2Visibility,int);
112  vtkBooleanMacro(Ray2Visibility,int);
113  vtkSetMacro(ArcVisibility,int);
114  vtkGetMacro(ArcVisibility,int);
115  vtkBooleanMacro(ArcVisibility,int);
117 
118 //BTX -- used to communicate about the state of the representation
119  enum {Outside=0,NearP1,NearCenter,NearP2};
120 //ETX
121 
123 
124  virtual void BuildRepresentation();
125  virtual int ComputeInteractionState(int X, int Y, int modify=0);
126  virtual void StartWidgetInteraction(double e[2]);
127  virtual void CenterWidgetInteraction(double e[2]);
128  virtual void WidgetInteraction(double e[2]);
130 
131 protected:
134 
135  // The handle and the rep used to close the handles
140 
141  // Selection tolerance for the handles
143 
144  // Visibility of the various pieces of the representation
148 
149  // Format for the label
150  char *LabelFormat;
151 
152 private:
153  vtkAngleRepresentation(const vtkAngleRepresentation&); //Not implemented
154  void operator=(const vtkAngleRepresentation&); //Not implemented
155 };
156 
157 #endif
vtkWidgetRepresentation.h
vtkAngleRepresentation::CenterRepresentation
vtkHandleRepresentation * CenterRepresentation
Definition: vtkAngleRepresentation.h:138
vtkAngleRepresentation::StartWidgetInteraction
virtual void StartWidgetInteraction(double e[2])
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
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)
vtkAngleRepresentation::SetPoint2DisplayPosition
virtual void SetPoint2DisplayPosition(double pos[3])=0
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:54
vtkAngleRepresentation::Point1Representation
vtkHandleRepresentation * Point1Representation
Definition: vtkAngleRepresentation.h:137
vtkHandleRepresentation
abstract class for representing widget handles
Definition: vtkHandleRepresentation.h:58
vtkAngleRepresentation::GetAngle
virtual double GetAngle()=0
vtkInteractionWidgetsModule.h
vtkAngleRepresentation::Point2Representation
vtkHandleRepresentation * Point2Representation
Definition: vtkAngleRepresentation.h:139
vtkAngleRepresentation::InstantiateHandleRepresentation
void InstantiateHandleRepresentation()
vtkAngleRepresentation::BuildRepresentation
virtual void BuildRepresentation()
vtkAngleRepresentation::ComputeInteractionState
virtual int ComputeInteractionState(int X, int Y, int modify=0)
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
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:142
vtkAngleRepresentation::LabelFormat
char * LabelFormat
Definition: vtkAngleRepresentation.h:150
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkAngleRepresentation::SetPoint1DisplayPosition
virtual void SetPoint1DisplayPosition(double pos[3])=0
vtkAngleRepresentation::vtkAngleRepresentation
vtkAngleRepresentation()
VTKINTERACTIONWIDGETS_EXPORT
#define VTKINTERACTIONWIDGETS_EXPORT
Definition: vtkInteractionWidgetsModule.h:15
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:136
vtkAngleRepresentation::GetCenterWorldPosition
virtual void GetCenterWorldPosition(double pos[3])=0
vtkAngleRepresentation::SetHandleRepresentation
void SetHandleRepresentation(vtkHandleRepresentation *handle)
vtkAngleRepresentation::Ray1Visibility
int Ray1Visibility
Definition: vtkAngleRepresentation.h:145
vtkAngleRepresentation::SetCenterDisplayPosition
virtual void SetCenterDisplayPosition(double pos[3])=0
vtkAngleRepresentation
represent the vtkAngleWidget
Definition: vtkAngleRepresentation.h:39
vtkAngleRepresentation::ArcVisibility
int ArcVisibility
Definition: vtkAngleRepresentation.h:147
vtkAngleRepresentation::GetPoint1WorldPosition
virtual void GetPoint1WorldPosition(double pos[3])=0
vtkAngleRepresentation::Ray2Visibility
int Ray2Visibility
Definition: vtkAngleRepresentation.h:146