75 #ifndef __vtkLineWidget_h
76 #define __vtkLineWidget_h
78 #include "vtkInteractionWidgetsModule.h"
83 class vtkPolyDataMapper;
102 void PrintSelf(ostream& os, vtkIndent indent);
106 virtual void SetEnabled(
int);
109 {this->Superclass::PlaceWidget();}
110 void PlaceWidget(
double xmin,
double xmax,
double ymin,
double ymax,
111 double zmin,
double zmax)
112 {this->Superclass::PlaceWidget(xmin,xmax,ymin,ymax,zmin,zmax);}
118 { this->LineSource->SetResolution(r); }
120 {
return this->LineSource->GetResolution(); }
125 void SetPoint1(
double x,
double y,
double z);
127 {this->SetPoint1(x[0], x[1], x[2]); }
129 {
return this->LineSource->GetPoint1();}
131 {this->LineSource->GetPoint1(xyz);}
136 void SetPoint2(
double x,
double y,
double z);
138 {this->SetPoint2(x[0], x[1], x[2]);}
140 {
return this->LineSource->GetPoint2();}
142 {this->LineSource->GetPoint2(xyz);}
150 vtkSetClampMacro(Align,
int, XAxis, None);
151 vtkGetMacro(Align,
int);
163 vtkSetMacro(ClampToBounds,
int);
164 vtkGetMacro(ClampToBounds,
int);
165 vtkBooleanMacro(ClampToBounds,
int);
179 vtkGetObjectMacro(HandleProperty,vtkProperty);
180 vtkGetObjectMacro(SelectedHandleProperty,vtkProperty);
186 vtkGetObjectMacro(LineProperty,vtkProperty);
187 vtkGetObjectMacro(SelectedLineProperty,vtkProperty);
195 friend class vtkPWCallback;
209 static void ProcessEvents(vtkObject*
object,
215 void OnLeftButtonDown();
216 void OnLeftButtonUp();
217 void OnMiddleButtonDown();
218 void OnMiddleButtonUp();
219 void OnRightButtonDown();
220 void OnRightButtonUp();
221 virtual void OnMouseMove();
239 void HighlightLine(
int highlight);
246 void BuildRepresentation();
248 void HandlesOn(
double length);
250 int HighlightHandle(vtkProp *prop);
251 void HighlightHandles(
int highlight);
257 double LastPosition[3];
258 void SetLinePosition(
double x[3]);
261 virtual void RegisterPickers();
264 void Scale(
double *p1,
double *p2,
int X,
int Y);
268 void ClampPosition(
double x[3]);
269 int InBounds(
double x[3]);
277 void CreateDefaultProperties();
289 void EnablePointWidget();
290 void DisablePointWidget();
291 int ForwardEvent(
unsigned long event);
concrete dataset represents vertices, lines, polygons, and triangle strips
create a polygonal sphere centered at the origin
create a line defined by two end points