39 #ifndef vtkImplicitCylinderRepresentation_h 
   40 #define vtkImplicitCylinderRepresentation_h 
   42 #include "vtkInteractionWidgetsModule.h"  
   63 #define VTK_MAX_CYL_RESOLUTION 2048 
   87   void SetCenter(
double x, 
double y, 
double z);
 
   88   void SetCenter(
double x[3]);
 
   90   void GetCenter(
double xyz[3]);
 
   98   void SetAxis(
double x, 
double y, 
double z);
 
   99   void SetAxis(
double a[3]);
 
  101   void GetAxis(
double a[3]);
 
  109   void SetRadius(
double r);
 
  121   vtkSetClampMacro(MinRadius, 
double, 0.001, 0.25);
 
  122   vtkGetMacro(MinRadius, 
double);
 
  124   vtkGetMacro(MaxRadius, 
double);
 
  166   vtkGetMacro(Resolution, 
int);
 
  207   vtkSetVector6Macro(WidgetBounds, 
double);
 
  208   vtkGetVector6Macro(WidgetBounds, 
double);
 
  222   vtkBooleanMacro(ConstrainToWidgetBounds, 
vtkTypeBool);
 
  252   void UpdatePlacement(
void);
 
  259   vtkGetObjectMacro(SelectedAxisProperty, 
vtkProperty);
 
  268   vtkGetObjectMacro(SelectedCylinderProperty, 
vtkProperty);
 
  276   vtkGetObjectMacro(SelectedOutlineProperty, 
vtkProperty);
 
  291   void SetEdgeColor(
double, 
double, 
double);
 
  292   void SetEdgeColor(
double x[3]);
 
  299   int ComputeInteractionState(
int X, 
int Y, 
int modify = 0) override;
 
  300   void PlaceWidget(
double bounds[6]) override;
 
  301   void BuildRepresentation() override;
 
  302   void StartWidgetInteraction(
double eventPos[2]) override;
 
  303   void WidgetInteraction(
double newEventPos[2]) override;
 
  304   void EndWidgetInteraction(
double newEventPos[2]) override;
 
  311   double* GetBounds() override;
 
  313   void ReleaseGraphicsResources(
vtkWindow*) override;
 
  315   int RenderTranslucentPolygonalGeometry(
vtkViewport*) override;
 
  316   vtkTypeBool HasTranslucentPolygonalGeometry() override;
 
  325   vtkSetClampMacro(BumpDistance, 
double, 0.000001, 1);
 
  326   vtkGetMacro(BumpDistance, 
double);
 
  336   void BumpCylinder(
int dir, 
double factor);
 
  344   void PushCylinder(
double distance);
 
  369   vtkSetClampMacro(InteractionState, 
int, Outside, TranslatingCenter);
 
  377   virtual void SetRepresentationState(
int);
 
  378   vtkGetMacro(RepresentationState, 
int);
 
  391   vtkGetMacro(TranslationAxis, 
int);
 
  392   vtkSetClampMacro(TranslationAxis, 
int, -1, 2);
 
  421   double LastEventPosition[3];
 
  446   void HighlightOutline(
int highlight);
 
  450   double WidgetBounds[6];
 
  458   void HighlightCylinder(
int highlight);
 
  471   void HighlightNormal(
int highlight);
 
  501   void Rotate(
double X, 
double Y, 
double* p1, 
double* p2, 
double* vpn);
 
  502   void TranslateCylinder(
double* p1, 
double* p2);
 
  503   void TranslateOutline(
double* p1, 
double* p2);
 
  504   void TranslateCenter(
double* p1, 
double* p2);
 
  505   void TranslateCenterOnAxis(
double* p1, 
double* p2);
 
  506   void ScaleRadius(
double* p1, 
double* p2);
 
  507   void AdjustRadius(
double X, 
double Y, 
double* p1, 
double* p2);
 
  508   void Scale(
double* p1, 
double* p2, 
double X, 
double Y);
 
  520   void CreateDefaultProperties();
 
  523   void BuildCylinder();