43#ifndef vtkPolarAxesActor_h
44#define vtkPolarAxesActor_h
49#include "vtkRenderingAnnotationModule.h"
56VTK_ABI_NAMESPACE_BEGIN
95 virtual void SetPole(
double,
double,
double);
96 vtkGetVector3Macro(Pole,
double);
104 vtkSetMacro(Log,
bool);
105 vtkGetMacro(Log,
bool);
106 vtkBooleanMacro(Log,
bool);
114 vtkSetClampMacro(RequestedNumberOfRadialAxes,
vtkIdType, 0, VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES);
123 vtkSetClampMacro(RequestedNumberOfPolarAxes,
vtkIdType, 0, VTK_MAXIMUM_NUMBER_OF_POLAR_AXES);
132 vtkSetVector2Macro(Range,
double);
133 vtkGetVectorMacro(Range,
double, 2);
142 vtkGetMacro(MinimumRadius,
double);
151 vtkGetMacro(MaximumRadius,
double);
160 vtkGetMacro(MinimumAngle,
double);
169 vtkGetMacro(MaximumAngle,
double);
178 vtkSetClampMacro(SmallestVisiblePolarAngle,
double, 0., 5.);
179 vtkGetMacro(SmallestVisiblePolarAngle,
double);
190 vtkGetMacro(TickLocation,
int);
197 vtkSetMacro(RadialUnits,
bool);
198 vtkGetMacro(RadialUnits,
bool);
208 vtkSetMacro(ScreenSize,
double);
209 vtkGetMacro(ScreenSize,
double);
218 vtkSetVector2Macro(PolarTitleOffset,
double);
219 vtkGetVectorMacro(PolarTitleOffset,
double, 2);
228 vtkSetVector2Macro(RadialTitleOffset,
double);
229 vtkGetVectorMacro(RadialTitleOffset,
double, 2);
237 vtkGetMacro(PolarLabelOffset,
double);
238 vtkSetMacro(PolarLabelOffset,
double);
246 vtkGetMacro(PolarExponentOffset,
double);
247 vtkSetMacro(PolarExponentOffset,
double);
264 vtkGetMacro(PolarAxisTitle, std::string);
265 vtkSetMacro(PolarAxisTitle, std::string);
272 vtkSetStringMacro(PolarLabelFormat);
273 vtkGetStringMacro(PolarLabelFormat);
278 VTK_EXPONENT_BOTTOM = 0,
279 VTK_EXPONENT_EXTERN = 1,
280 VTK_EXPONENT_LABELS = 2
297 vtkSetStringMacro(RadialAngleFormat);
298 vtkGetStringMacro(RadialAngleFormat);
313 vtkSetMacro(EnableDistanceLOD,
bool);
314 vtkGetMacro(EnableDistanceLOD,
bool);
322 vtkSetClampMacro(DistanceLODThreshold,
double, 0.0, 1.0);
323 vtkGetMacro(DistanceLODThreshold,
double);
331 vtkSetMacro(EnableViewAngleLOD,
bool);
332 vtkGetMacro(EnableViewAngleLOD,
bool);
340 vtkSetClampMacro(ViewAngleLODThreshold,
double, 0., 1.);
341 vtkGetMacro(ViewAngleLODThreshold,
double);
349 vtkSetMacro(PolarAxisVisibility,
bool);
350 vtkGetMacro(PolarAxisVisibility,
bool);
351 vtkBooleanMacro(PolarAxisVisibility,
bool);
359 vtkSetMacro(DrawRadialGridlines,
bool);
360 vtkGetMacro(DrawRadialGridlines,
bool);
361 vtkBooleanMacro(DrawRadialGridlines,
bool);
369 vtkSetMacro(DrawPolarArcsGridlines,
bool);
370 vtkGetMacro(DrawPolarArcsGridlines,
bool);
371 vtkBooleanMacro(DrawPolarArcsGridlines,
bool);
379 vtkSetMacro(PolarTitleVisibility,
bool);
380 vtkGetMacro(PolarTitleVisibility,
bool);
381 vtkBooleanMacro(PolarTitleVisibility,
bool);
386 VTK_TITLE_BOTTOM = 0,
396 vtkSetClampMacro(RadialAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
397 vtkGetMacro(RadialAxisTitleLocation,
int);
406 vtkSetClampMacro(PolarAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
407 vtkGetMacro(PolarAxisTitleLocation,
int);
415 vtkSetMacro(PolarLabelVisibility,
bool);
416 vtkGetMacro(PolarLabelVisibility,
bool);
417 vtkBooleanMacro(PolarLabelVisibility,
bool);
427 vtkSetMacro(ArcTicksOriginToPolarAxis,
bool);
428 vtkGetMacro(ArcTicksOriginToPolarAxis,
bool);
429 vtkBooleanMacro(ArcTicksOriginToPolarAxis,
bool);
439 vtkSetMacro(RadialAxesOriginToPolarAxis,
bool);
440 vtkGetMacro(RadialAxesOriginToPolarAxis,
bool);
441 vtkBooleanMacro(RadialAxesOriginToPolarAxis,
bool);
449 vtkSetMacro(PolarTickVisibility,
bool);
450 vtkGetMacro(PolarTickVisibility,
bool);
451 vtkBooleanMacro(PolarTickVisibility,
bool);
459 vtkSetMacro(AxisTickVisibility,
bool);
460 vtkGetMacro(AxisTickVisibility,
bool);
461 vtkBooleanMacro(AxisTickVisibility,
bool);
469 vtkSetMacro(AxisMinorTickVisibility,
bool);
470 vtkGetMacro(AxisMinorTickVisibility,
bool);
471 vtkBooleanMacro(AxisMinorTickVisibility,
bool);
479 vtkSetMacro(AxisTickMatchesPolarAxes,
bool);
480 vtkGetMacro(AxisTickMatchesPolarAxes,
bool);
481 vtkBooleanMacro(AxisTickMatchesPolarAxes,
bool);
489 vtkSetMacro(ArcTickVisibility,
bool);
490 vtkGetMacro(ArcTickVisibility,
bool);
491 vtkBooleanMacro(ArcTickVisibility,
bool);
499 vtkSetMacro(ArcMinorTickVisibility,
bool);
500 vtkGetMacro(ArcMinorTickVisibility,
bool);
501 vtkBooleanMacro(ArcMinorTickVisibility,
bool);
509 vtkSetMacro(ArcTickMatchesRadialAxes,
bool);
510 vtkGetMacro(ArcTickMatchesRadialAxes,
bool);
511 vtkBooleanMacro(ArcTickMatchesRadialAxes,
bool);
520 vtkSetMacro(ArcMajorTickSize,
double);
521 vtkGetMacro(ArcMajorTickSize,
double);
530 vtkSetMacro(PolarAxisMajorTickSize,
double);
531 vtkGetMacro(PolarAxisMajorTickSize,
double);
540 vtkSetMacro(LastRadialAxisMajorTickSize,
double);
541 vtkGetMacro(LastRadialAxisMajorTickSize,
double);
549 vtkSetMacro(PolarAxisTickRatioSize,
double);
550 vtkGetMacro(PolarAxisTickRatioSize,
double);
558 vtkSetMacro(LastAxisTickRatioSize,
double);
559 vtkGetMacro(LastAxisTickRatioSize,
double);
567 vtkSetMacro(ArcTickRatioSize,
double);
568 vtkGetMacro(ArcTickRatioSize,
double);
576 vtkSetMacro(TickRatioRadiusSize,
double);
577 vtkGetMacro(TickRatioRadiusSize,
double);
585 vtkSetMacro(PolarAxisMajorTickThickness,
double);
586 vtkGetMacro(PolarAxisMajorTickThickness,
double);
594 vtkSetMacro(LastRadialAxisMajorTickThickness,
double);
595 vtkGetMacro(LastRadialAxisMajorTickThickness,
double);
603 vtkSetMacro(ArcMajorTickThickness,
double);
604 vtkGetMacro(ArcMajorTickThickness,
double);
612 vtkSetMacro(PolarAxisTickRatioThickness,
double);
613 vtkGetMacro(PolarAxisTickRatioThickness,
double);
621 vtkSetMacro(LastAxisTickRatioThickness,
double);
622 vtkGetMacro(LastAxisTickRatioThickness,
double);
630 vtkSetMacro(ArcTickRatioThickness,
double);
631 vtkGetMacro(ArcTickRatioThickness,
double);
639 vtkSetMacro(DeltaRangeMajor,
double);
640 vtkGetMacro(DeltaRangeMajor,
double);
648 vtkSetMacro(DeltaRangeMinor,
double);
649 vtkGetMacro(DeltaRangeMinor,
double);
658 vtkSetMacro(RequestedDeltaRangePolarAxes,
double);
659 vtkGetMacro(RequestedDeltaRangePolarAxes,
double);
667 vtkSetMacro(DeltaAngleMajor,
double);
668 vtkGetMacro(DeltaAngleMajor,
double);
676 vtkSetMacro(DeltaAngleMinor,
double);
677 vtkGetMacro(DeltaAngleMinor,
double);
686 vtkSetMacro(RequestedDeltaAngleRadialAxes,
double);
687 vtkGetMacro(RequestedDeltaAngleRadialAxes,
double);
697 vtkSetMacro(RadialAxesVisibility,
bool);
698 vtkGetMacro(RadialAxesVisibility,
bool);
699 vtkBooleanMacro(RadialAxesVisibility,
bool);
707 vtkSetMacro(RadialTitleVisibility,
bool);
708 vtkGetMacro(RadialTitleVisibility,
bool);
709 vtkBooleanMacro(RadialTitleVisibility,
bool);
717 vtkSetMacro(PolarArcsVisibility,
bool);
718 vtkGetMacro(PolarArcsVisibility,
bool);
719 vtkBooleanMacro(PolarArcsVisibility,
bool);
817 vtkSetVector6Macro(Bounds,
double);
820 double& xmin,
double& xmax,
double& ymin,
double& ymax,
double& zmin,
double& zmax);
832 vtkSetClampMacro(Ratio,
double, 0.001, 100.0);
833 vtkGetMacro(Ratio,
double);
841 vtkSetClampMacro(PolarArcResolutionPerDegree,
double, VTK_MINIMUM_POLAR_ARC_RESOLUTION_PER_DEG,
842 VTK_MAXIMUM_POLAR_ARC_RESOLUTION_PER_DEG);
843 vtkGetMacro(PolarArcResolutionPerDegree,
double);
903 double a,
double angleEllipseRad,
double tickSize,
vtkPoints* tickPts);
966 double Pole[3] = { 0.0, 0.0, 0.0 };
971 int NumberOfRadialAxes = 0;
977 int RequestedNumberOfRadialAxes = 0;
982 int NumberOfPolarAxes = 5;
988 int RequestedNumberOfPolarAxes = 5;
998 double PolarArcResolutionPerDegree = 0.2;
1003 double Range[2] = { 0.0, 10.0 };
1008 double DeltaRangeMinor = 0.5;
1013 double DeltaRangeMajor = 1.0;
1018 double DeltaRangePolarAxes = 0.0;
1024 double RequestedDeltaRangePolarAxes = 0.0;
1029 double DeltaAngleMinor = 22.5;
1034 double DeltaAngleMajor = 45.0;
1039 double DeltaAngleRadialAxes = 45.0;
1045 double RequestedDeltaAngleRadialAxes = 45.0;
1050 double MinimumRadius = 0.0;
1055 double MaximumRadius = 1.0;
1065 double MinimumAngle = 0.0;
1070 double MaximumAngle = 90.0;
1075 double SmallestVisiblePolarAngle = 0.5;
1104 std::vector<vtkSmartPointer<vtkAxisActor>> RadialAxes;
1111 std::string PolarAxisTitle =
"Radial Distance";
1112 char* PolarLabelFormat =
nullptr;
1118 char* RadialAngleFormat =
nullptr;
1123 bool RadialUnits =
true;
1128 bool EnableDistanceLOD =
true;
1133 double DistanceLODThreshold = 0.7;
1138 bool EnableViewAngleLOD =
true;
1144 double ViewAngleLODThreshold = 0.3;
1150 bool PolarAxisVisibility =
true;
1151 bool PolarTitleVisibility =
true;
1152 bool PolarLabelVisibility =
true;
1167 bool PolarTickVisibility =
true;
1175 bool ArcTicksOriginToPolarAxis =
true;
1183 bool RadialAxesOriginToPolarAxis =
true;
1188 bool AxisTickVisibility =
true, AxisMinorTickVisibility =
false;
1193 bool AxisTickMatchesPolarAxes =
true;
1198 bool ArcTickVisibility =
true, ArcMinorTickVisibility =
false;
1203 bool ArcTickMatchesRadialAxes =
true;
1208 double PolarAxisMajorTickSize = 0.0, LastRadialAxisMajorTickSize = 0.0, ArcMajorTickSize = 0.0;
1213 double PolarAxisTickRatioSize = 0.3, LastAxisTickRatioSize = 0.3, ArcTickRatioSize = 0.3;
1218 double TickRatioRadiusSize = 0.02;
1223 double PolarAxisMajorTickThickness = 1.0, LastRadialAxisMajorTickThickness = 1.0,
1224 ArcMajorTickThickness = 1.0;
1229 double PolarAxisTickRatioThickness = 0.5, LastAxisTickRatioThickness = 0.5,
1230 ArcTickRatioThickness = 0.5;
1236 bool RadialAxesVisibility =
true;
1237 bool RadialTitleVisibility =
true;
1243 int RadialAxisTitleLocation = VTK_TITLE_BOTTOM;
1248 int PolarAxisTitleLocation = VTK_TITLE_BOTTOM;
1254 int ExponentLocation = VTK_EXPONENT_LABELS;
1259 bool PolarArcsVisibility =
true;
1264 bool DrawRadialGridlines =
true;
1269 bool DrawPolarArcsGridlines =
true;
1332 double ScreenSize = 10.0;
1338 double PolarTitleOffset[2] = { 20.0, 10.0 }, RadialTitleOffset[2] = { 20.0, 0.0 };
1339 double PolarLabelOffset = 10.0, PolarExponentOffset = 5.0;
1342 static constexpr int VTK_MAXIMUM_NUMBER_OF_POLAR_AXES = 20;
1343 static constexpr int VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES = 50;
1344 static constexpr double VTK_MINIMUM_POLAR_ARC_RESOLUTION_PER_DEG = 0.05;
1345 static constexpr double VTK_MAXIMUM_POLAR_ARC_RESOLUTION_PER_DEG = 100.0;
1351VTK_ABI_NAMESPACE_END
represents an object (geometry & properties) in a rendered scene
Create an axis with tick marks and labels.
a virtual camera for 3D rendering
a simple class to control print indentation
Allocate and hold a VTK object.
represent and manipulate 3D points
create an actor of a polar axes -
vtkProperty * GetLastRadialAxisProperty()
Get/Set last radial axis actor properties.
virtual void SetCamera(vtkCamera *)
Set/Get the camera to perform scaling and translation of the vtkPolarAxesActor.
double * GetBounds() override
Explicitly specify the region in space around which to draw the bounds.
vtkTextProperty * GetLastRadialAxisTextProperty()
Set/Get the last radial axis text property.
virtual void SetPolarAxisProperty(vtkProperty *)
Get/Set polar axis actor properties.
void CalculateBounds()
Calculate bounds based on maximum radius and angular sector.
vtkTextProperty * GetSecondaryRadialAxesTextProperty()
Set/Get the secondary radial axes text property.
void GetBounds(double bounds[6])
Explicitly specify the region in space around which to draw the bounds.
void AutoScale(vtkViewport *viewport)
Automatically rescale titles and labels NB: Current implementation only for perspective projections.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool GetUse2DMode()
Enable/Disable labels 2D mode (always facing the camera).
virtual void SetLastRadialAxisTextProperty(vtkTextProperty *p)
Set/Get the last radial axis text property.
void BuildPolarAxisLabelsArcs()
Build polar axis labels and arcs with respect to specified pole.
virtual void SetLastRadialAxisProperty(vtkProperty *p)
Get/Set last radial axis actor properties.
virtual void SetSecondaryPolarArcsProperty(vtkProperty *p)
Get/Set secondary polar arcs actors property.
virtual void SetSecondaryRadialAxesProperty(vtkProperty *p)
Get/Set secondary radial axes actors properties.
void StoreTicksPtsFromParamEllipse(double a, double angleEllipseRad, double tickSize, vtkPoints *tickPts)
Init tick point located on an ellipse at angleEllipseRad angle and according to "a" major radius.
vtkTextProperty * GetPolarAxisTitleTextProperty()
Set/Get the polar axis title text property.
virtual void SetMinimumRadius(double)
Set/Get the minimal radius of the polar coordinates.
virtual void ComputeDeltaAngleRadialAxes(vtkIdType)
Compute delta angle of radial axes.
static vtkPolarAxesActor * New()
void GetBounds(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax)
Explicitly specify the region in space around which to draw the bounds.
vtkCamera * GetCamera()
Set/Get the camera to perform scaling and translation of the vtkPolarAxesActor.
void GetSignificantPartFromValues(vtkStringArray *valuesStr, std::list< double > &valuesList)
Yield a string array with the float part of each values.
virtual void SetMinimumAngle(double)
Set/Get the minimum radius of the polar coordinates (in degrees).
vtkProperty * GetPolarArcsProperty()
Get/Set principal polar arc actor property.
virtual void SetPole(double[3])
Explicitly specify the coordinate of the pole.
void BuildLabelsLog()
Define label values.
void BuildArcTicks()
Build Arc ticks.
void CreateRadialAxes(int axisCount)
Create requested number of type X axes.
double FSign(double, double)
Convenience methods.
void SetUseTextActor3D(bool enable)
Enable / Disable labels text 3D mode in underlying axes.
void BuildRadialAxes(vtkViewport *viewport=nullptr)
Build requested number of radial axes with respect to specified pole.
double ComputeIdealStep(int subDivsRequired, double rangeLength, int maxSubDivs=1000)
return a step attempting to be as rounded as possible according to input parameters
static double ComputeEllipseAngle(double angleInDegrees, double ratio)
convert section angle to an angle applied to ellipse equation.
virtual void SetPolarAxisTitleTextProperty(vtkTextProperty *p)
Set/Get the polar axis title text property.
bool CheckMembersConsistency()
Check consistency of vtkPolarAxesActor members.
void GetRendered3DProps(vtkPropCollection *, bool translucent)
Fill the collection with the underlying vtkProp3D in use.
vtkProperty * GetSecondaryPolarArcsProperty()
Get/Set secondary polar arcs actors property.
void BuildPolarAxisLabelsArcsLog()
Build labels and arcs with log scale axis.
virtual void SetSecondaryRadialAxesTextProperty(vtkTextProperty *p)
Set/Get the secondary radial axes text property.
int RenderOverlay(vtkViewport *) override
Draw the polar axes.
virtual void ComputeDeltaRangePolarAxes(vtkIdType)
Compute delta range of polar axes.
void SetCommonAxisAttributes(vtkAxisActor *)
Send attributes which are common to all axes, both polar and radial.
vtkProperty * GetSecondaryRadialAxesProperty()
Get/Set secondary radial axes actors properties.
virtual void SetMaximumRadius(double)
Set/Get the maximum radius of the polar coordinates.
double FFix(double)
Convenience methods.
virtual void SetPole(double, double, double)
Explicitly specify the coordinate of the pole.
void SetUse2DMode(bool enable)
Enable/Disable labels 2D mode (always facing the camera).
int RenderOpaqueGeometry(vtkViewport *) override
Draw the polar axes.
void SetPolarAxisAttributes(vtkAxisActor *)
Set properties specific to PolarAxis.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
std::string FindExponentAndAdjustValues(std::list< double > &valuesList)
Find a common exponent for label values.
virtual void SetMaximumAngle(double)
Set/Get the maximum radius of the polar coordinates (in degrees).
vtkTextProperty * GetPolarAxisLabelTextProperty()
Set/Get the polar axis labels text property.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the polar axes.
~vtkPolarAxesActor() override
virtual void SetPolarAxisLabelTextProperty(vtkTextProperty *p)
Set/Get the polar axis labels text property.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Draw the polar axes.
vtkProperty * GetPolarAxisProperty()
Get/Set polar axis actor properties.
void BuildAxes(vtkViewport *)
Build the axes.
virtual void SetPolarArcsProperty(vtkProperty *p)
Get/Set principal polar arc actor property.
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
represent surface properties of a geometric object
Hold a reference to a vtkObjectBase instance.
a vtkAbstractArray subclass for strings
represent text properties.
record modification and/or execution time
abstract specification for Viewports
window superclass for vtkRenderWindow