87 #ifndef __vtkBrokenLineWidget_h
88 #define __vtkBrokenLineWidget_h
90 #include "vtkInteractionWidgetsModule.h"
99 class vtkPolyDataMapper;
105 #define VTK_PROJECTION_YZ 0
106 #define VTK_PROJECTION_XZ 1
107 #define VTK_PROJECTION_XY 2
108 #define VTK_PROJECTION_OBLIQUE 3
117 void PrintSelf(ostream& os, vtkIndent indent);
121 virtual void SetEnabled(
int);
124 {this->Superclass::PlaceWidget();}
125 void PlaceWidget(
double xmin,
double xmax,
double ymin,
double ymax,
126 double zmin,
double zmax)
127 {this->Superclass::PlaceWidget(xmin,xmax,ymin,ymax,zmin,zmax);}
138 vtkSetMacro(ProjectToPlane,
int);
139 vtkGetMacro(ProjectToPlane,
int);
140 vtkBooleanMacro(ProjectToPlane,
int);
148 vtkGetMacro(ProjectionNormal,
int);
150 { this->SetProjectionNormal(0); }
152 { this->SetProjectionNormal(1); }
154 { this->SetProjectionNormal(2); }
156 { this->SetProjectionNormal(3); }
164 void SetProjectionPosition(
double position);
165 vtkGetMacro(ProjectionPosition,
double);
180 virtual void SetHandleProperty(vtkProperty*);
181 vtkGetObjectMacro(HandleProperty, vtkProperty);
182 virtual void SetSelectedHandleProperty(vtkProperty*);
183 vtkGetObjectMacro(SelectedHandleProperty, vtkProperty);
189 virtual void SetLineProperty(vtkProperty*);
190 vtkGetObjectMacro(LineProperty, vtkProperty);
191 virtual void SetSelectedLineProperty(vtkProperty*);
192 vtkGetObjectMacro(SelectedLineProperty, vtkProperty);
197 virtual void SetNumberOfHandles(
int npts);
198 vtkGetMacro(NumberOfHandles,
int);
204 void SetHandlePosition(
int handle,
double x,
double y,
double z);
205 void SetHandlePosition(
int handle,
double xyz[3]);
206 void GetHandlePosition(
int handle,
double xyz[3]);
207 double* GetHandlePosition(
int handle);
211 double GetSummedLength();
215 void InitializeHandles(vtkPoints* points);
220 vtkSetClampMacro(ProcessEvents,
int, 0, 1);
221 vtkGetMacro(ProcessEvents,
int);
222 vtkBooleanMacro( ProcessEvents,
int );
228 vtkSetClampMacro(HandleSizeFactor,
double, 0., 100.);
229 vtkGetMacro(HandleSizeFactor,
double);
251 static void ProcessEventsHandler(vtkObject*
object,
257 void OnLeftButtonDown();
258 void OnLeftButtonUp();
259 void OnMiddleButtonDown();
260 void OnMiddleButtonUp();
261 void OnRightButtonDown();
262 void OnRightButtonUp();
272 void ProjectPointsToPlane();
273 void ProjectPointsToOrthoPlane();
274 void ProjectPointsToObliquePlane();
280 void HighlightLine(
int highlight);
282 void BuildRepresentation();
288 int HighlightHandle(vtkProp *prop);
290 void InsertHandleOnLine(
double* pos);
291 void EraseHandle(
const int&);
300 virtual void RegisterPickers();
303 void MovePoint(
double *p1,
double *p2);
304 void Scale(
double *p1,
double *p2,
int X,
int Y);
305 void Translate(
double *p1,
double *p2);
306 void Spin(
double *p1,
double *p2,
double *vpn);
317 void CreateDefaultProperties();
321 void CalculateCentroid();
concrete dataset represents vertices, lines, polygons, and triangle strips
create a polygonal sphere centered at the origin
create an array of quadrilaterals located in a plane
create a line defined by two end points