29#ifndef vtkImplicitAnnulusRepresentation_h
30#define vtkImplicitAnnulusRepresentation_h
33#include "vtkInteractionWidgetsModule.h"
37VTK_ABI_NAMESPACE_BEGIN
50#define VTK_MAX_ANNULUS_RESOLUTION 2048
92 void SetAxis(
double x,
double y,
double z);
130 vtkGetMacro(AlongXAxis,
bool);
131 vtkBooleanMacro(AlongXAxis,
bool);
133 vtkGetMacro(AlongYAxis,
bool);
134 vtkBooleanMacro(AlongYAxis,
bool);
136 vtkGetMacro(AlongZAxis,
bool);
137 vtkBooleanMacro(AlongZAxis,
bool);
148 vtkGetMacro(DrawAnnulus,
bool);
149 vtkBooleanMacro(DrawAnnulus,
bool);
161 vtkGetMacro(Resolution,
int);
171 vtkSetMacro(Tubing,
bool);
172 vtkGetMacro(Tubing,
bool);
173 vtkBooleanMacro(Tubing,
bool);
181 vtkSetMacro(ScaleEnabled,
bool);
182 vtkGetMacro(ScaleEnabled,
bool);
183 vtkBooleanMacro(ScaleEnabled,
bool);
269 vtkSetClampMacro(BumpDistance,
double, 0.000001, 1);
270 vtkGetMacro(BumpDistance,
double);
323 struct AxisHandleRepresentation
334 struct RadiusHandleRepresentation
342 vtkImplicitAnnulusRepresentation(
const vtkImplicitAnnulusRepresentation&) =
delete;
343 void operator=(
const vtkImplicitAnnulusRepresentation&) =
delete;
345 void HighlightAnnulus(
bool highlight);
346 void HighlightCenterHandle(
bool highlight);
347 void HighlightAxis(
bool highlight);
348 void HighlightInnerRadiusHandle(
bool highlight);
349 void HighlightOuterRadiusHandle(
bool highlight);
353 double X,
double Y,
const vtkVector3d& p1,
const vtkVector3d& p2,
const vtkVector3d& vpn);
354 void TranslateAnnulus(
const vtkVector3d& p1,
const vtkVector3d& p2);
356 void TranslateCenter(
const vtkVector3d& p1,
const vtkVector3d& p2);
357 void TranslateCenterOnAxis(
const vtkVector3d& p1,
const vtkVector3d& p2);
358 void ScaleRadii(
const vtkVector3d& p1,
const vtkVector3d& p2);
359 void AdjustOuterRadius(
double x,
double y,
const vtkVector3d& point);
360 void AdjustInnerRadius(
double x,
double y,
const vtkVector3d& point);
361 void Scale(
const vtkVector3d& p1,
const vtkVector3d& p2,
double X,
double Y);
368 vtkNew<vtkAnnulus> Annulus;
370 InteractionStateType RepresentationState = InteractionStateType::Outside;
373 vtkVector3d LastEventPosition;
376 double BumpDistance = 0.01;
379 bool AlongXAxis =
false;
380 bool AlongYAxis =
false;
381 bool AlongZAxis =
false;
384 int Resolution = 128;
386 bool ScaleEnabled =
true;
388 vtkNew<vtkPolyData> AnnulusPD;
389 vtkNew<vtkPolyDataMapper> AnnulusMapper;
390 vtkNew<vtkActor> AnnulusActor;
391 bool DrawAnnulus =
true;
394 RadiusHandleRepresentation InnerRadiusRepresentation;
395 RadiusHandleRepresentation OuterRadiusRepresentation;
399 AxisHandleRepresentation LowerAxisRepresentation;
400 AxisHandleRepresentation UpperAxisRepresentation;
403 vtkNew<vtkSphereSource> CenterHandleSource;
404 vtkNew<vtkPolyDataMapper> CenterHandleMapper;
405 vtkNew<vtkActor> CenterHandleActor;
408 vtkNew<vtkCellPicker> Picker;
409 vtkNew<vtkCellPicker> AnnulusPicker;
413 vtkNew<vtkProperty> AxisProperty;
414 vtkNew<vtkProperty> SelectedAxisProperty;
415 vtkNew<vtkProperty> AnnulusProperty;
416 vtkNew<vtkProperty> SelectedAnnulusProperty;
417 vtkNew<vtkProperty> RadiusHandleProperty;
418 vtkNew<vtkProperty> SelectedRadiusHandleProperty;
419 vtkNew<vtkProperty> CenterHandleProperty;
420 vtkNew<vtkProperty> SelectedCenterHandleProperty;
422 vtkNew<vtkBox> BoundingBox;
represents an object (geometry & properties) in a rendered scene
implicit function for a annulus
implicit function for a bounding box
ray-cast cell picker for all kinds of Prop3Ds
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods supporting the rendering process.
void SetAlongYAxis(bool)
Force the annulus widget to be aligned with one of the x-y-z axes.
void UpdatePlacement()
Satisfies the superclass API.
void PushAnnulus(double distance)
Push the annulus the distance specified along the view vector.
void PlaceWidget(double bounds[6]) override
Methods to interface with the vtkImplicitAnnulusWidget.
static vtkImplicitAnnulusRepresentation * New()
void SetDrawAnnulus(bool draw)
Enable/disable the drawing of the annulus.
double * GetBounds() override
Methods supporting the rendering process.
void GetAnnulus(vtkAnnulus *annulus) const
void BuildRepresentation() override
Methods to interface with the vtkImplicitAnnulusWidget.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
void SetAlongZAxis(bool)
Force the annulus widget to be aligned with one of the x-y-z axes.
void SetOuterRadius(double r)
Set/Get the annulus outer radius.
void SetHandleColor(double c[3])
Set the color of all the widgets handles (edges, axis, selected annulus) and their color during inter...
void SetInteractionColor(double c[3])
Set the color of all the widgets handles (edges, axis, selected annulus) and their color during inter...
void SetForegroundColor(double, double, double)
Set the color of all the widgets handles (edges, axis, selected annulus) and their color during inter...
void SetInteractionColor(double, double, double)
Set the color of all the widgets handles (edges, axis, selected annulus) and their color during inter...
double * GetCenter() const
Get the center of the annulus representation.
double GetOuterRadius() const
Set/Get the annulus outer radius.
vtkImplicitAnnulusRepresentation()
void BumpAnnulus(int dir, double factor)
Translate the annulus in the direction of the view vector by the specified BumpDistance.
void GetPolyData(vtkPolyData *pd)
Grab the polydata that defines the annulus.
void SetAxis(double x, double y, double z)
Set/Get the axis of rotation for the annulus.
void SetForegroundColor(double c[3])
Set the color of all the widgets handles (edges, axis, selected annulus) and their color during inter...
double GetInnerRadius() const
Set/Get the annulus inner radius.
void ReleaseGraphicsResources(vtkWindow *) override
Methods supporting the rendering process.
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Methods supporting the rendering process.
int RenderOpaqueGeometry(vtkViewport *) override
Methods supporting the rendering process.
void SetCenter(double x[3])
Get the center of the annulus representation.
virtual void SetRepresentationState(InteractionStateType)
Sets the visual appearance of the representation based on the state it is in.
void SetAlongXAxis(bool)
Force the annulus widget to be aligned with one of the x-y-z axes.
void SetInnerRadius(double r)
Set/Get the annulus inner radius.
~vtkImplicitAnnulusRepresentation() override
void SetCenter(double x, double y, double z)
Get the center of the annulus representation.
int ComputeInteractionState(int X, int Y, int modify=0) override
Methods to interface with the vtkImplicitAnnulusWidget.
void EndWidgetInteraction(double newEventPos[2]) override
Methods to interface with the vtkImplicitAnnulusWidget.
void WidgetInteraction(double newEventPos[2]) override
Methods to interface with the vtkImplicitAnnulusWidget.
void SetHandleColor(double, double, double)
Set the color of all the widgets handles (edges, axis, selected annulus) and their color during inter...
void GetActors(vtkPropCollection *pc) override
Methods supporting the rendering process.
void StartWidgetInteraction(double eventPos[2]) override
Methods to interface with the vtkImplicitAnnulusWidget.
double * GetAxis() const
Set/Get the axis of rotation for the annulus.
a simple class to control print indentation
create a line defined by two end points
Allocate and hold a VTK object.
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
represent surface properties of a geometric object
create a polygonal sphere centered at the origin
filter that generates tubes around lines
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_MAX_ANNULUS_RESOLUTION
#define VTK_SIZEHINT(...)