39 #ifndef vtkImplicitCylinderRepresentation_h
40 #define vtkImplicitCylinderRepresentation_h
42 #include "vtkInteractionWidgetsModule.h"
63 #define VTK_MAX_CYL_RESOLUTION 2048
86 void SetCenter(
double x,
double y,
double z);
87 void SetCenter(
double x[3]);
89 void GetCenter(
double xyz[3]);
97 void SetAxis(
double x,
double y,
double z);
98 void SetAxis(
double a[3]);
100 void GetAxis(
double a[3]);
108 void SetRadius(
double r);
120 vtkSetClampMacro(MinRadius,
double,0.001,0.25);
121 vtkGetMacro(MinRadius,
double);
123 vtkGetMacro(MaxRadius,
double);
165 vtkGetMacro(Resolution,
int);
206 vtkSetVector6Macro(WidgetBounds,
double);
207 vtkGetVector6Macro(WidgetBounds,
double);
221 vtkBooleanMacro(ConstrainToWidgetBounds,
vtkTypeBool);
251 void UpdatePlacement(
void);
258 vtkGetObjectMacro(SelectedAxisProperty,
vtkProperty);
267 vtkGetObjectMacro(SelectedCylinderProperty,
vtkProperty);
275 vtkGetObjectMacro(SelectedOutlineProperty,
vtkProperty);
290 void SetEdgeColor(
double,
double,
double);
291 void SetEdgeColor(
double x[3]);
298 int ComputeInteractionState(
int X,
int Y,
int modify=0) override;
299 void PlaceWidget(
double bounds[6]) override;
300 void BuildRepresentation() override;
301 void StartWidgetInteraction(
double eventPos[2]) override;
302 void WidgetInteraction(
double newEventPos[2]) override;
303 void EndWidgetInteraction(
double newEventPos[2]) override;
310 double *GetBounds() override;
312 void ReleaseGraphicsResources(
vtkWindow*) override;
314 int RenderTranslucentPolygonalGeometry(
vtkViewport*) override;
315 int HasTranslucentPolygonalGeometry() override;
324 vtkSetClampMacro(BumpDistance,
double,0.000001,1);
325 vtkGetMacro(BumpDistance,
double);
335 void BumpCylinder(
int dir,
double factor);
343 void PushCylinder(
double distance);
368 vtkSetClampMacro(InteractionState,
int,Outside,TranslatingCenter);
376 virtual void SetRepresentationState(
int);
377 vtkGetMacro(RepresentationState,
int);
392 double LastEventPosition[3];
417 void HighlightOutline(
int highlight);
421 double WidgetBounds[6];
429 void HighlightCylinder(
int highlight);
442 void HighlightNormal(
int highlight);
472 void Rotate(
double X,
double Y,
double *p1,
double *p2,
double *vpn);
473 void TranslateCylinder(
double *p1,
double *p2);
474 void TranslateOutline(
double *p1,
double *p2);
475 void TranslateCenter(
double *p1,
double *p2);
476 void TranslateCenterOnAxis(
double *p1,
double *p2);
477 void ScaleRadius(
double *p1,
double *p2);
478 void AdjustRadius(
double X,
double Y,
double *p1,
double *p2);
479 void Scale(
double *p1,
double *p2,
double X,
double Y);
491 void CreateDefaultProperties();
494 void BuildCylinder();