42 #ifndef vtkImplicitCylinderRepresentation_h
43 #define vtkImplicitCylinderRepresentation_h
45 #include "vtkInteractionWidgetsModule.h"
66 #define VTK_MAX_CYL_RESOLUTION 2048
89 void SetCenter(
double x,
double y,
double z);
90 void SetCenter(
double x[3]);
92 void GetCenter(
double xyz[3]);
100 void SetAxis(
double x,
double y,
double z);
101 void SetAxis(
double a[3]);
103 void GetAxis(
double a[3]);
111 void SetRadius(
double r);
123 vtkSetClampMacro(MinRadius,
double,0.001,0.25);
124 vtkGetMacro(MinRadius,
double);
126 vtkGetMacro(MaxRadius,
double);
168 vtkGetMacro(Resolution,
int);
209 vtkSetVector6Macro(WidgetBounds,
double);
210 vtkGetVector6Macro(WidgetBounds,
double);
224 vtkBooleanMacro(ConstrainToWidgetBounds,
vtkTypeBool);
254 void UpdatePlacement(
void);
261 vtkGetObjectMacro(SelectedAxisProperty,
vtkProperty);
270 vtkGetObjectMacro(SelectedCylinderProperty,
vtkProperty);
278 vtkGetObjectMacro(SelectedOutlineProperty,
vtkProperty);
293 void SetEdgeColor(
double,
double,
double);
294 void SetEdgeColor(
double x[3]);
301 int ComputeInteractionState(
int X,
int Y,
int modify=0) override;
302 void PlaceWidget(
double bounds[6]) override;
303 void BuildRepresentation() override;
304 void StartWidgetInteraction(
double eventPos[2]) override;
305 void WidgetInteraction(
double newEventPos[2]) override;
306 void EndWidgetInteraction(
double newEventPos[2]) override;
313 double *GetBounds() override;
315 void ReleaseGraphicsResources(
vtkWindow*) override;
317 int RenderTranslucentPolygonalGeometry(
vtkViewport*) override;
318 vtkTypeBool HasTranslucentPolygonalGeometry() override;
327 vtkSetClampMacro(BumpDistance,
double,0.000001,1);
328 vtkGetMacro(BumpDistance,
double);
338 void BumpCylinder(
int dir,
double factor);
346 void PushCylinder(
double distance);
371 vtkSetClampMacro(InteractionState,
int,Outside,TranslatingCenter);
379 virtual void SetRepresentationState(
int);
380 vtkGetMacro(RepresentationState,
int);
395 double LastEventPosition[3];
420 void HighlightOutline(
int highlight);
424 double WidgetBounds[6];
432 void HighlightCylinder(
int highlight);
445 void HighlightNormal(
int highlight);
475 void Rotate(
double X,
double Y,
double *p1,
double *p2,
double *vpn);
476 void TranslateCylinder(
double *p1,
double *p2);
477 void TranslateOutline(
double *p1,
double *p2);
478 void TranslateCenter(
double *p1,
double *p2);
479 void TranslateCenterOnAxis(
double *p1,
double *p2);
480 void ScaleRadius(
double *p1,
double *p2);
481 void AdjustRadius(
double X,
double Y,
double *p1,
double *p2);
482 void Scale(
double *p1,
double *p2,
double X,
double Y);
494 void CreateDefaultProperties();
497 void BuildCylinder();