33 #ifndef vtkPolarAxesActor_h 34 #define vtkPolarAxesActor_h 36 #define VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES 50 37 #define VTK_DEFAULT_NUMBER_OF_RADIAL_AXES 5 38 #define VTK_MAXIMUM_NUMBER_OF_POLAR_AXIS_TICKS 200 39 #define VTK_MAXIMUM_RATIO 1000.0 40 #define VTK_POLAR_ARC_RESOLUTION_PER_DEG 0.2 44 #include "vtkRenderingAnnotationModule.h" 79 virtual void SetPole(
double[3]);
80 virtual void SetPole(
double,
double,
double);
81 vtkGetVector3Macro(Pole,
double);
89 vtkSetMacro(Log,
bool);
90 vtkGetMacro(Log,
bool);
91 vtkBooleanMacro(Log,
bool);
99 vtkGetMacro(RequestedNumberOfRadialAxes,
vtkIdType);
107 virtual void SetNumberOfPolarAxisTicks(
int);
108 int GetNumberOfPolarAxisTicks();
116 vtkSetMacro(AutoSubdividePolarAxis,
bool);
117 vtkGetMacro(AutoSubdividePolarAxis,
bool);
118 vtkBooleanMacro(AutoSubdividePolarAxis,
bool);
125 vtkSetVector2Macro(Range,
double);
126 vtkGetVectorMacro(Range,
double, 2);
133 virtual void SetMinimumRadius(
double);
134 vtkGetMacro(MinimumRadius,
double);
141 virtual void SetMaximumRadius(
double);
142 vtkGetMacro(MaximumRadius,
double);
149 virtual void SetMinimumAngle(
double);
150 vtkGetMacro(MinimumAngle,
double);
157 virtual void SetMaximumAngle(
double);
158 vtkGetMacro(MaximumAngle,
double);
167 vtkSetClampMacro(SmallestVisiblePolarAngle,
double, 0., 5.);
168 vtkGetMacro(SmallestVisiblePolarAngle,
double);
178 vtkGetMacro(TickLocation,
int);
185 vtkSetMacro(RadialUnits,
bool);
186 vtkGetMacro(RadialUnits,
bool);
196 vtkSetMacro(ScreenSize,
double);
197 vtkGetMacro(ScreenSize,
double);
214 vtkSetStringMacro(PolarAxisTitle);
215 vtkGetStringMacro(PolarAxisTitle);
222 vtkSetStringMacro(PolarLabelFormat);
223 vtkGetStringMacro(PolarLabelFormat);
228 VTK_EXPONENT_BOTTOM = 0,
229 VTK_EXPONENT_EXTERN = 1,
230 VTK_EXPONENT_LABELS = 2
239 vtkSetClampMacro(ExponentLocation,
int, VTK_EXPONENT_BOTTOM, VTK_EXPONENT_LABELS);
240 vtkGetMacro(ExponentLocation,
int);
247 vtkSetStringMacro(RadialAngleFormat);
248 vtkGetStringMacro(RadialAngleFormat);
262 vtkSetMacro(EnableDistanceLOD,
int);
263 vtkGetMacro(EnableDistanceLOD,
int);
270 vtkSetClampMacro(DistanceLODThreshold,
double, 0.0, 1.0);
271 vtkGetMacro(DistanceLODThreshold,
double);
278 vtkSetMacro(EnableViewAngleLOD,
int);
279 vtkGetMacro(EnableViewAngleLOD,
int);
286 vtkSetClampMacro(ViewAngleLODThreshold,
double, 0., 1.);
287 vtkGetMacro(ViewAngleLODThreshold,
double);
314 vtkBooleanMacro(DrawPolarArcsGridlines,
vtkTypeBool);
323 vtkBooleanMacro(PolarTitleVisibility,
vtkTypeBool);
328 VTK_TITLE_BOTTOM = 0,
337 vtkSetClampMacro(RadialAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
338 vtkGetMacro(RadialAxisTitleLocation,
int);
346 vtkSetClampMacro(PolarAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
347 vtkGetMacro(PolarAxisTitleLocation,
int);
356 vtkBooleanMacro(PolarLabelVisibility,
vtkTypeBool);
366 vtkSetMacro(ArcTicksOriginToPolarAxis,
vtkTypeBool);
367 vtkGetMacro(ArcTicksOriginToPolarAxis,
vtkTypeBool);
368 vtkBooleanMacro(ArcTicksOriginToPolarAxis,
vtkTypeBool);
378 vtkSetMacro(RadialAxesOriginToPolarAxis,
vtkTypeBool);
379 vtkGetMacro(RadialAxesOriginToPolarAxis,
vtkTypeBool);
380 vtkBooleanMacro(RadialAxesOriginToPolarAxis,
vtkTypeBool);
407 vtkBooleanMacro(AxisMinorTickVisibility,
vtkTypeBool);
425 vtkBooleanMacro(ArcMinorTickVisibility,
vtkTypeBool);
432 vtkSetMacro(ArcMajorTickSize,
double);
433 vtkGetMacro(ArcMajorTickSize,
double);
440 vtkSetMacro(PolarAxisMajorTickSize,
double);
441 vtkGetMacro(PolarAxisMajorTickSize,
double);
448 vtkSetMacro(LastRadialAxisMajorTickSize,
double);
449 vtkGetMacro(LastRadialAxisMajorTickSize,
double);
456 vtkSetMacro(PolarAxisTickRatioSize,
double);
457 vtkGetMacro(PolarAxisTickRatioSize,
double);
464 vtkSetMacro(LastAxisTickRatioSize,
double);
465 vtkGetMacro(LastAxisTickRatioSize,
double);
472 vtkSetMacro(ArcTickRatioSize,
double);
473 vtkGetMacro(ArcTickRatioSize,
double);
480 vtkSetMacro(PolarAxisMajorTickThickness,
double);
481 vtkGetMacro(PolarAxisMajorTickThickness,
double);
488 vtkSetMacro(LastRadialAxisMajorTickThickness,
double);
489 vtkGetMacro(LastRadialAxisMajorTickThickness,
double);
496 vtkSetMacro(ArcMajorTickThickness,
double);
497 vtkGetMacro(ArcMajorTickThickness,
double);
504 vtkSetMacro(PolarAxisTickRatioThickness,
double);
505 vtkGetMacro(PolarAxisTickRatioThickness,
double);
512 vtkSetMacro(LastAxisTickRatioThickness,
double);
513 vtkGetMacro(LastAxisTickRatioThickness,
double);
520 vtkSetMacro(ArcTickRatioThickness,
double);
521 vtkGetMacro(ArcTickRatioThickness,
double);
528 vtkSetMacro(DeltaRangeMajor,
double);
529 vtkGetMacro(DeltaRangeMajor,
double);
536 vtkSetMacro(DeltaRangeMinor,
double);
537 vtkGetMacro(DeltaRangeMinor,
double);
544 vtkSetMacro(DeltaAngleMajor,
double);
545 vtkGetMacro(DeltaAngleMajor,
double);
552 vtkSetMacro(DeltaAngleMinor,
double);
553 vtkGetMacro(DeltaAngleMinor,
double);
560 vtkSetMacro(DeltaAngleRadialAxes,
double);
561 vtkGetMacro(DeltaAngleRadialAxes,
double);
572 vtkBooleanMacro(RadialAxesVisibility,
vtkTypeBool);
581 vtkBooleanMacro(RadialTitleVisibility,
vtkTypeBool);
597 void SetUse2DMode(
int val);
645 virtual void SetLastRadialAxisProperty(
vtkProperty* p);
646 vtkGetObjectMacro(LastRadialAxisProperty,
vtkProperty);
653 virtual void SetSecondaryRadialAxesProperty(
vtkProperty* p);
654 vtkGetObjectMacro(SecondaryRadialAxesProperty,
vtkProperty);
669 virtual void SetSecondaryPolarArcsProperty(
vtkProperty* p);
680 vtkSetVector6Macro(Bounds,
double);
683 double& xmin,
double& xmax,
double& ymin,
double& ymax,
double& zmin,
double& zmax);
691 vtkSetClampMacro(Ratio,
double, 0.001, 100.0);
692 vtkGetMacro(Ratio,
double);
702 bool CheckMembersConsistency();
713 void CalculateBounds();
728 void CreateRadialAxes(
int axisCount);
733 void BuildRadialAxes();
741 void AutoComputeTicksProperties();
746 double ComputeIdealStep(
int subDivsRequired,
double rangeLength,
int maxSubDivs = 1000);
751 void BuildArcTicks();
757 void StoreTicksPtsFromParamEllipse(
758 double a,
double angleEllipseRad,
double tickSize,
vtkPoints* tickPts);
763 void BuildPolarAxisLabelsArcs();
768 void BuildPolarAxisLabelsArcsLog();
773 void BuildLabelsLog();
775 void BuildPolarArcsLog();
780 std::string FindExponentAndAdjustValues(std::list<double>& valuesList);
785 void GetSignificantPartFromValues(
vtkStringArray* valuesStr, std::list<double>& valuesList);
792 double FSign(
double,
double);
805 static double ComputeEllipseAngle(
double angleInDegrees,
double ratio);
810 virtual void ComputeDeltaAngleRadialAxes(
vtkIdType);
vtkProperty * SecondaryRadialAxesProperty
General properties of radial axes.
double MinimumRadius
Minimum polar radius.
int PolarAxisTitleLocation
Define the alignment of the title related to the polar axis.
vtkPolyDataMapper * ArcTickPolyDataMapper
vtk object for arc Ticks
vtkActor * ArcTickActor
vtk object for arc Ticks
bool AutoScaleRadius
Auto-scale polar radius (with respect to average length scale of x-y bounding box).
represents an object (geometry & properties) in a rendered scene
vtkTextProperty * SecondaryRadialAxesTextProperty
Text properties of secondary radial axes.
double MaximumAngle
Maximum polar angle Default: 90.
int TickLocation
Describes the tick orientation for the graph elements involved by this property.
vtkPolyDataMapper * SecondaryPolarArcsMapper
Structures for secondary polar arcs.
char * PolarLabelFormat
Title to be used for the polar axis NB: Non-polar radial axes use the polar angle as title and have n...
vtkTypeBool PolarAxisVisibility
Visibility of polar axis and its title, labels, ticks (major only)
abstract specification for Viewports
represent surface properties of a geometric object
virtual int RenderOverlay(vtkViewport *)
int EnableDistanceLOD
If enabled the actor will not be visible at a certain distance from the camera.
double Ratio
Ratio for elliptical representation of the polar axes actor.
vtkPolyDataMapper * PolarArcsMapper
record modification and/or execution time
Create an axis with tick marks and labels.
vtkPolyData * SecondaryPolarArcs
Structures for secondary polar arcs.
double PolarAxisMajorTickThickness
Defines the tickness of the major ticks.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkActor * ArcMinorTickActor
vtk object for arc Ticks
char * PolarAxisTitle
Title to be used for the polar axis NB: Non-polar radial axes use the polar angle as title and have n...
a vtkAbstractArray subclass for strings
vtkTextProperty * PolarAxisTitleTextProperty
Text properties of polar axis title and labels.
double SmallestVisiblePolarAngle
Smallest radial angle distinguishable from polar axis.
vtkTypeBool PolarTickVisibility
Hold visibility for all present ticks.
vtkActor * SecondaryPolarArcsActor
Structures for secondary polar arcs.
vtkTypeBool RadialAxesVisibility
Visibility of radial axes and their titles.
concrete dataset represents vertices, lines, polygons, and triangle strips
static vtkActor * New()
Creates an actor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,1,1) visibility=1 pickable=1 dragable=1 orientation=(0,0,0).
double MinimumAngle
Minimum polar angle Default: 0.
vtkAxisActor ** RadialAxes
Control variables for non-polar radial axes.
double PolarAxisMajorTickSize
Defines the length of the ticks located on the last arc.
vtkActor * PolarArcsActor
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
double ScreenSize
Text screen size.
window superclass for vtkRenderWindow
vtkProperty * PolarAxisProperty
General properties of polar axis Behavior may be override by polar axis ticks 's actor property...
vtkTypeBool AxisTickVisibility
Hold visibility of major/minor ticks for the polar axis and the last radial axis. ...
double PolarAxisTickRatioSize
Set the ratios between major tick Size for each ticks location.
int ExponentLocation
Define the location of the exponent of the labels values, located on the polar axis.
vtkTypeBool DrawRadialGridlines
Visibility of the inner axes (overridden to 0 if RadialAxesVisibility is set to 0) ...
int RadialAxisTitleLocation
Define the alignment of the title related to the radial axis.
double DeltaAngleMinor
Angle between 2 minor ticks on the last arc.
double DeltaAngleMajor
Angle between 2 major ticks on the last arc.
a simple class to control print indentation
int RequestedNumberOfRadialAxes
Requested Number of radial axes.
a virtual camera for 3D rendering
vtkTypeBool DrawPolarArcsGridlines
Visibility of the inner arcs (overridden to 0 if PolarArcsVisibility is set to 0) ...
vtkPolyDataMapper * ArcMinorTickPolyDataMapper
vtk object for arc Ticks
int NumberOfRadialAxes
Number of radial axes.
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
represent text properties.
vtkProperty * LastRadialAxisProperty
General properties of last radial axis.
vtkTypeBool PolarTitleVisibility
Visibility of polar axis and its title, labels, ticks (major only)
map vtkPolyData to graphics primitives
vtkAxisActor * PolarAxis
Control variables for polar axis.
double TitleScale
Title scale factor.
double PolarAxisTickRatioThickness
Set the ratios between major tick thickness for each ticks location.
double ViewAngleLODThreshold
This determines at what view angle to geometry will make the geometry not visible.
bool RadialUnits
Display angle units (degrees) to label radial axes Default is true.
vtkCamera * Camera
Camera attached to the polar axes system.
vtkPolyData * ArcMinorTickPolyData
vtk object for arc Ticks
vtkTypeBool PolarLabelVisibility
Visibility of polar axis and its title, labels, ticks (major only)
double LabelScale
Label scale factor.
vtkTypeBool PolarArcsVisibility
Visibility of polar arcs.
vtkTypeBool RadialTitleVisibility
Visibility of radial axes and their titles.
int EnableViewAngleLOD
If enabled the actor will not be visible at a certain view angle.
double DeltaAngleRadialAxes
Angle between 2 radial Axes.
vtkTextProperty * LastRadialAxisTextProperty
Text properties of last radial axis.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the polar axes.
int ArcTicksOriginToPolarAxis
If On, the ticks are drawn from the angle of the polarAxis (i.e.
double MaximumRadius
Maximum polar radius.
vtkPoints * ArcMajorTickPts
Keep the arc major ticks vtkPoints instances.
int RadialAxesOriginToPolarAxis
If On, the radial axes are drawn from the angle of the polarAxis (i.e.
double DeltaRangeMajor
Step between 2 major ticks, in range value (values displayed on the axis).
vtkPoints * ArcMinorTickPts
Keep the arc minor ticks vtkPoints instances.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
bool Log
Enable/Disable log scale Default: 0.
represent and manipulate 3D points
char * RadialAngleFormat
String to format angle values displayed on the radial axes.
vtkTextProperty * PolarAxisLabelTextProperty
Text properties of polar axis title and labels.
vtkPolyData * ArcTickPolyData
vtk object for arc Ticks
#define VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES
vtkTypeBool ArcTickVisibility
Enable / Disable major/minor tick visibility on the last arc displayed.
bool AutoSubdividePolarAxis
Whether the number of polar axis ticks and arcs should be automatically calculated.
double DeltaRangeMinor
Step between 2 minor ticks, in range value (values displayed on the axis).
double DistanceLODThreshold
Default is 0.80 This determines at what fraction of camera far clip range, actor is not visible...
create an actor of a polar axes -