42 #ifndef vtkImplicitCylinderRepresentation_h
43 #define vtkImplicitCylinderRepresentation_h
46 #include "vtkInteractionWidgetsModule.h"
67 #define VTK_MAX_CYL_RESOLUTION 2048
91 void SetCenter(
double x,
double y,
double z);
92 void SetCenter(
double x[3]);
94 void GetCenter(
double xyz[3]);
102 void SetAxis(
double x,
double y,
double z);
103 void SetAxis(
double a[3]);
105 void GetAxis(
double a[3]);
113 void SetRadius(
double r);
125 vtkSetClampMacro(MinRadius,
double, 0.001, 0.25);
126 vtkGetMacro(MinRadius,
double);
128 vtkGetMacro(MaxRadius,
double);
140 vtkGetMacro(AlongXAxis, vtkTypeBool);
141 vtkBooleanMacro(AlongXAxis, vtkTypeBool);
142 void SetAlongYAxis(vtkTypeBool);
143 vtkGetMacro(AlongYAxis, vtkTypeBool);
144 vtkBooleanMacro(AlongYAxis, vtkTypeBool);
145 void SetAlongZAxis(vtkTypeBool);
146 vtkGetMacro(AlongZAxis, vtkTypeBool);
147 vtkBooleanMacro(AlongZAxis, vtkTypeBool);
157 void SetDrawCylinder(vtkTypeBool drawCyl);
158 vtkGetMacro(DrawCylinder, vtkTypeBool);
159 vtkBooleanMacro(DrawCylinder, vtkTypeBool);
170 vtkGetMacro(Resolution,
int);
179 vtkSetMacro(Tubing, vtkTypeBool);
180 vtkGetMacro(Tubing, vtkTypeBool);
181 vtkBooleanMacro(Tubing, vtkTypeBool);
189 vtkSetMacro(OutlineTranslation, vtkTypeBool);
190 vtkGetMacro(OutlineTranslation, vtkTypeBool);
191 vtkBooleanMacro(OutlineTranslation, vtkTypeBool);
199 vtkSetMacro(OutsideBounds, vtkTypeBool);
200 vtkGetMacro(OutsideBounds, vtkTypeBool);
201 vtkBooleanMacro(OutsideBounds, vtkTypeBool);
211 vtkSetVector6Macro(WidgetBounds,
double);
212 vtkGetVector6Macro(WidgetBounds,
double);
224 vtkSetMacro(ConstrainToWidgetBounds, vtkTypeBool);
225 vtkGetMacro(ConstrainToWidgetBounds, vtkTypeBool);
226 vtkBooleanMacro(ConstrainToWidgetBounds, vtkTypeBool);
233 vtkSetMacro(ScaleEnabled, vtkTypeBool);
234 vtkGetMacro(ScaleEnabled, vtkTypeBool);
235 vtkBooleanMacro(ScaleEnabled, vtkTypeBool);
256 void UpdatePlacement(
void);
263 vtkGetObjectMacro(SelectedAxisProperty, vtkProperty);
271 vtkGetObjectMacro(CylinderProperty, vtkProperty);
272 vtkGetObjectMacro(SelectedCylinderProperty, vtkProperty);
279 vtkGetObjectMacro(OutlineProperty, vtkProperty);
280 vtkGetObjectMacro(SelectedOutlineProperty, vtkProperty);
288 vtkGetObjectMacro(EdgesProperty, vtkProperty);
295 void SetEdgeColor(
double,
double,
double);
296 void SetEdgeColor(
double c[3]);
303 int ComputeInteractionState(
int X,
int Y,
int modify = 0) override;
304 void PlaceWidget(
double bounds[6]) override;
305 void BuildRepresentation() override;
306 void StartWidgetInteraction(
double eventPos[2]) override;
307 void WidgetInteraction(
double newEventPos[2]) override;
308 void EndWidgetInteraction(
double newEventPos[2]) override;
317 void ReleaseGraphicsResources(
vtkWindow*) override;
319 int RenderTranslucentPolygonalGeometry(
vtkViewport*) override;
320 vtkTypeBool HasTranslucentPolygonalGeometry() override;
329 vtkSetClampMacro(BumpDistance,
double, 0.000001, 1);
330 vtkGetMacro(BumpDistance,
double);
340 void BumpCylinder(
int dir,
double factor);
348 void PushCylinder(
double distance);
362 #if !defined(VTK_LEGACY_REMOVE)
377 vtkSetClampMacro(InteractionState,
int, Outside, TranslatingCenter);
385 virtual void SetRepresentationState(
int);
386 vtkGetMacro(RepresentationState,
int);
399 vtkGetMacro(TranslationAxis,
int);
400 vtkSetClampMacro(TranslationAxis,
int, -1, 2);
429 double LastEventPosition[3];
454 void HighlightOutline(
int highlight);
458 double WidgetBounds[6];
466 void HighlightCylinder(
int highlight);
479 void HighlightNormal(
int highlight);
509 void Rotate(
double X,
double Y,
double* p1,
double* p2,
double* vpn);
510 void TranslateCylinder(
double* p1,
double* p2);
511 void TranslateOutline(
double* p1,
double* p2);
512 void TranslateCenter(
double* p1,
double* p2);
513 void TranslateCenterOnAxis(
double* p1,
double* p2);
514 void ScaleRadius(
double* p1,
double* p2);
515 void AdjustRadius(
double X,
double Y,
double* p1,
double* p2);
516 void Scale(
double* p1,
double* p2,
double X,
double Y);
528 void CreateDefaultProperties();
531 void BuildCylinder();
vtkPolyDataMapper * ConeMapper
void SetZTranslationAxisOn()
Toggles constraint translation axis on/off.
vtkConeSource * ConeSource2
void GetBounds(T a, double bds[6])
bool IsTranslationConstrained()
Returns true if ContrainedAxis.
represents an object (geometry & properties) in a rendered scene
int ConstrainToWidgetBounds
vtkPolyDataMapper * OutlineMapper
vtkOutlineFilter * Outline
abstract specification for Viewports
represent surface properties of a geometric object
#define VTK_DEPRECATED_IN_9_2_0(reason)
vtkTypeBool OutsideBounds
vtkProperty * CylinderProperty
defining the representation for a vtkImplicitCylinderWidget
map scalar values into colors via a lookup table
vtkPolyDataMapper * LineMapper
void SetTranslationAxisOff()
Toggles constraint translation axis on/off.
vtkLineSource * LineSource2
concrete dataset represents vertices, lines, polygons, and triangle strips
vtkCellPicker * CylPicker
vtkConeSource * ConeSource
void SetXTranslationAxisOn()
Toggles constraint translation axis on/off.
vtkProperty * OutlineProperty
window superclass for vtkRenderWindow
create wireframe outline for an arbitrary data set or composite dataset
create a polygonal sphere centered at the origin
Superclass for algorithms that produce only polydata as output.
vtkPolyDataMapper * LineMapper2
vtkProperty * SelectedAxisProperty
filter that generates tubes around lines
void SetYTranslationAxisOn()
Toggles constraint translation axis on/off.
a simple class to control print indentation
extract interior, boundary, non-manifold, and/or sharp edges from polygonal data
topologically and geometrically regular array of data
vtkProperty * SelectedOutlineProperty
vtkLineSource * LineSource
vtkPolyDataMapper * CylMapper
vtkProperty * EdgesProperty
#define VTK_SIZEHINT(...)
create a line defined by two end points
map vtkPolyData to graphics primitives
vtkPolyDataMapper * SphereMapper
ray-cast cell picker for all kinds of Prop3Ds
vtkPolyDataMapper * EdgesMapper
vtkTubeFilter * EdgesTuber
vtkProperty * SelectedCylinderProperty
vtkTypeBool OutlineTranslation
implicit function for a cylinder
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
implicit function for a bounding box
vtkPolyDataMapper * ConeMapper2
#define VTK_MAX_CYL_RESOLUTION
vtkProperty * AxisProperty