41 #ifndef vtkLineRepresentation_h
42 #define vtkLineRepresentation_h
44 #include "vtkInteractionWidgetsModule.h"
83 void GetPoint1WorldPosition(
double pos[3]);
85 void GetPoint1DisplayPosition(
double pos[3]);
87 void SetPoint1WorldPosition(
double pos[3]);
88 void SetPoint1DisplayPosition(
double pos[3]);
89 void GetPoint2DisplayPosition(
double pos[3]);
91 void GetPoint2WorldPosition(
double pos[3]);
93 void SetPoint2WorldPosition(
double pos[3]);
94 void SetPoint2DisplayPosition(
double pos[3]);
109 void InstantiateHandleRepresentation();
127 vtkGetObjectMacro(SelectedEndPointProperty,
vtkProperty);
136 vtkGetObjectMacro(SelectedEndPoint2Property,
vtkProperty);
145 vtkGetObjectMacro(SelectedLineProperty,
vtkProperty);
154 vtkSetClampMacro(Tolerance,
int,1,100);
155 vtkGetMacro(Tolerance,
int);
164 void SetResolution(
int res);
182 void PlaceWidget(
double bounds[6]) override;
183 void BuildRepresentation() override;
184 int ComputeInteractionState(
int X,
int Y,
int modify=0) override;
185 void StartWidgetInteraction(
double e[2]) override;
186 void WidgetInteraction(
double e[2]) override;
195 void ReleaseGraphicsResources(
vtkWindow*) override;
197 int RenderTranslucentPolygonalGeometry(
vtkViewport*) override;
198 vtkTypeBool HasTranslucentPolygonalGeometry() override;
214 vtkSetClampMacro(InteractionState,
int,Outside,Scaling);
222 virtual void SetRepresentationState(
int);
223 vtkGetMacro(RepresentationState,
int);
231 void SetDirectionalLine(
bool val);
232 vtkGetMacro(DirectionalLine,
bool);
233 vtkBooleanMacro(DirectionalLine,
bool);
251 vtkSetMacro( DistanceAnnotationVisibility,
vtkTypeBool );
252 vtkGetMacro( DistanceAnnotationVisibility,
vtkTypeBool );
253 vtkBooleanMacro( DistanceAnnotationVisibility,
vtkTypeBool );
262 vtkSetStringMacro(DistanceAnnotationFormat);
263 vtkGetStringMacro(DistanceAnnotationFormat);
276 this->SetDistanceAnnotationScale(
scale);
278 virtual void SetDistanceAnnotationScale(
double scale[3] );
279 virtual double * GetDistanceAnnotationScale()
VTK_SIZEHINT(3);
285 double GetDistance();
292 void SetLineColor(
double r,
double g,
double b);
297 virtual
vtkProperty *GetDistanceAnnotationProperty();
306 enum { RestrictNone = 0, RestrictToX, RestrictToY, RestrictToZ };
312 vtkSetClampMacro(RestrictFlag,
int, RestrictNone, RestrictToZ);
346 void CreateDefaultProperties();
353 void ClampPosition(
double x[3]);
354 void HighlightPoint(
int ptId,
int highlight);
355 void HighlightLine(
int highlight);
356 int InBounds(
double x[3]);
362 double StartLineHandle[3];
364 double LastEventPosition[3];