24#ifndef vtkPolarAxesActor_h
25#define vtkPolarAxesActor_h
30#include "vtkRenderingAnnotationModule.h"
37VTK_ABI_NAMESPACE_BEGIN
71 virtual void SetPole(
double,
double,
double);
72 vtkGetVector3Macro(Pole,
double);
80 vtkSetMacro(Log,
bool);
81 vtkGetMacro(Log,
bool);
82 vtkBooleanMacro(Log,
bool);
90 vtkSetClampMacro(RequestedNumberOfRadialAxes,
vtkIdType, 0, VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES);
91 vtkGetMacro(RequestedNumberOfRadialAxes,
vtkIdType);
99 vtkSetClampMacro(RequestedNumberOfPolarAxes,
vtkIdType, 0, VTK_MAXIMUM_NUMBER_OF_POLAR_AXES);
108 vtkSetVector2Macro(Range,
double);
109 vtkGetVectorMacro(Range,
double, 2);
118 vtkGetMacro(MinimumRadius,
double);
127 vtkGetMacro(MaximumRadius,
double);
136 vtkGetMacro(MinimumAngle,
double);
145 vtkGetMacro(MaximumAngle,
double);
154 vtkSetClampMacro(SmallestVisiblePolarAngle,
double, 0., 5.);
155 vtkGetMacro(SmallestVisiblePolarAngle,
double);
166 vtkGetMacro(TickLocation,
int);
173 vtkSetMacro(RadialUnits,
bool);
174 vtkGetMacro(RadialUnits,
bool);
184 vtkSetMacro(ScreenSize,
double);
185 vtkGetMacro(ScreenSize,
double);
194 vtkSetVector2Macro(PolarTitleOffset,
double);
195 vtkGetVectorMacro(PolarTitleOffset,
double, 2);
204 vtkSetVector2Macro(RadialTitleOffset,
double);
205 vtkGetVectorMacro(RadialTitleOffset,
double, 2);
213 vtkGetMacro(PolarLabelOffset,
double);
214 vtkSetMacro(PolarLabelOffset,
double);
222 vtkGetMacro(PolarExponentOffset,
double);
223 vtkSetMacro(PolarExponentOffset,
double);
240 vtkGetMacro(PolarAxisTitle, std::string);
241 vtkSetMacro(PolarAxisTitle, std::string);
248 vtkSetStringMacro(PolarLabelFormat);
249 vtkGetStringMacro(PolarLabelFormat);
254 VTK_EXPONENT_BOTTOM = 0,
255 VTK_EXPONENT_EXTERN = 1,
256 VTK_EXPONENT_LABELS = 2
273 vtkSetStringMacro(RadialAngleFormat);
274 vtkGetStringMacro(RadialAngleFormat);
289 vtkSetMacro(EnableDistanceLOD,
bool);
290 vtkGetMacro(EnableDistanceLOD,
bool);
298 vtkSetClampMacro(DistanceLODThreshold,
double, 0.0, 1.0);
299 vtkGetMacro(DistanceLODThreshold,
double);
307 vtkSetMacro(EnableViewAngleLOD,
bool);
308 vtkGetMacro(EnableViewAngleLOD,
bool);
316 vtkSetClampMacro(ViewAngleLODThreshold,
double, 0., 1.);
317 vtkGetMacro(ViewAngleLODThreshold,
double);
325 vtkSetMacro(PolarAxisVisibility,
bool);
326 vtkGetMacro(PolarAxisVisibility,
bool);
327 vtkBooleanMacro(PolarAxisVisibility,
bool);
335 vtkSetMacro(DrawRadialGridlines,
bool);
336 vtkGetMacro(DrawRadialGridlines,
bool);
337 vtkBooleanMacro(DrawRadialGridlines,
bool);
345 vtkSetMacro(DrawPolarArcsGridlines,
bool);
346 vtkGetMacro(DrawPolarArcsGridlines,
bool);
347 vtkBooleanMacro(DrawPolarArcsGridlines,
bool);
355 vtkSetMacro(PolarTitleVisibility,
bool);
356 vtkGetMacro(PolarTitleVisibility,
bool);
357 vtkBooleanMacro(PolarTitleVisibility,
bool);
362 VTK_TITLE_BOTTOM = 0,
372 vtkSetClampMacro(RadialAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
373 vtkGetMacro(RadialAxisTitleLocation,
int);
382 vtkSetClampMacro(PolarAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
383 vtkGetMacro(PolarAxisTitleLocation,
int);
391 vtkSetMacro(PolarLabelVisibility,
bool);
392 vtkGetMacro(PolarLabelVisibility,
bool);
393 vtkBooleanMacro(PolarLabelVisibility,
bool);
403 vtkSetMacro(ArcTicksOriginToPolarAxis,
bool);
404 vtkGetMacro(ArcTicksOriginToPolarAxis,
bool);
405 vtkBooleanMacro(ArcTicksOriginToPolarAxis,
bool);
415 vtkSetMacro(RadialAxesOriginToPolarAxis,
bool);
416 vtkGetMacro(RadialAxesOriginToPolarAxis,
bool);
417 vtkBooleanMacro(RadialAxesOriginToPolarAxis,
bool);
425 vtkSetMacro(PolarTickVisibility,
bool);
426 vtkGetMacro(PolarTickVisibility,
bool);
427 vtkBooleanMacro(PolarTickVisibility,
bool);
435 vtkSetMacro(AxisTickVisibility,
bool);
436 vtkGetMacro(AxisTickVisibility,
bool);
437 vtkBooleanMacro(AxisTickVisibility,
bool);
445 vtkSetMacro(AxisMinorTickVisibility,
bool);
446 vtkGetMacro(AxisMinorTickVisibility,
bool);
447 vtkBooleanMacro(AxisMinorTickVisibility,
bool);
455 vtkSetMacro(AxisTickMatchesPolarAxes,
bool);
456 vtkGetMacro(AxisTickMatchesPolarAxes,
bool);
457 vtkBooleanMacro(AxisTickMatchesPolarAxes,
bool);
465 vtkSetMacro(ArcTickVisibility,
bool);
466 vtkGetMacro(ArcTickVisibility,
bool);
467 vtkBooleanMacro(ArcTickVisibility,
bool);
475 vtkSetMacro(ArcMinorTickVisibility,
bool);
476 vtkGetMacro(ArcMinorTickVisibility,
bool);
477 vtkBooleanMacro(ArcMinorTickVisibility,
bool);
485 vtkSetMacro(ArcTickMatchesRadialAxes,
bool);
486 vtkGetMacro(ArcTickMatchesRadialAxes,
bool);
487 vtkBooleanMacro(ArcTickMatchesRadialAxes,
bool);
496 vtkSetMacro(ArcMajorTickSize,
double);
497 vtkGetMacro(ArcMajorTickSize,
double);
506 vtkSetMacro(PolarAxisMajorTickSize,
double);
507 vtkGetMacro(PolarAxisMajorTickSize,
double);
516 vtkSetMacro(LastRadialAxisMajorTickSize,
double);
517 vtkGetMacro(LastRadialAxisMajorTickSize,
double);
525 vtkSetMacro(PolarAxisTickRatioSize,
double);
526 vtkGetMacro(PolarAxisTickRatioSize,
double);
534 vtkSetMacro(LastAxisTickRatioSize,
double);
535 vtkGetMacro(LastAxisTickRatioSize,
double);
543 vtkSetMacro(ArcTickRatioSize,
double);
544 vtkGetMacro(ArcTickRatioSize,
double);
552 vtkSetMacro(TickRatioRadiusSize,
double);
553 vtkGetMacro(TickRatioRadiusSize,
double);
561 vtkSetMacro(PolarAxisMajorTickThickness,
double);
562 vtkGetMacro(PolarAxisMajorTickThickness,
double);
570 vtkSetMacro(LastRadialAxisMajorTickThickness,
double);
571 vtkGetMacro(LastRadialAxisMajorTickThickness,
double);
579 vtkSetMacro(ArcMajorTickThickness,
double);
580 vtkGetMacro(ArcMajorTickThickness,
double);
588 vtkSetMacro(PolarAxisTickRatioThickness,
double);
589 vtkGetMacro(PolarAxisTickRatioThickness,
double);
597 vtkSetMacro(LastAxisTickRatioThickness,
double);
598 vtkGetMacro(LastAxisTickRatioThickness,
double);
606 vtkSetMacro(ArcTickRatioThickness,
double);
607 vtkGetMacro(ArcTickRatioThickness,
double);
615 vtkSetMacro(DeltaRangeMajor,
double);
616 vtkGetMacro(DeltaRangeMajor,
double);
624 vtkSetMacro(DeltaRangeMinor,
double);
625 vtkGetMacro(DeltaRangeMinor,
double);
634 vtkSetMacro(RequestedDeltaRangePolarAxes,
double);
635 vtkGetMacro(RequestedDeltaRangePolarAxes,
double);
643 vtkSetMacro(DeltaAngleMajor,
double);
644 vtkGetMacro(DeltaAngleMajor,
double);
652 vtkSetMacro(DeltaAngleMinor,
double);
653 vtkGetMacro(DeltaAngleMinor,
double);
662 vtkSetMacro(RequestedDeltaAngleRadialAxes,
double);
663 vtkGetMacro(RequestedDeltaAngleRadialAxes,
double);
673 vtkSetMacro(RadialAxesVisibility,
bool);
674 vtkGetMacro(RadialAxesVisibility,
bool);
675 vtkBooleanMacro(RadialAxesVisibility,
bool);
683 vtkSetMacro(RadialTitleVisibility,
bool);
684 vtkGetMacro(RadialTitleVisibility,
bool);
685 vtkBooleanMacro(RadialTitleVisibility,
bool);
693 vtkSetMacro(PolarArcsVisibility,
bool);
694 vtkGetMacro(PolarArcsVisibility,
bool);
695 vtkBooleanMacro(PolarArcsVisibility,
bool);
786 vtkSetVector6Macro(Bounds,
double);
789 double& xmin,
double& xmax,
double& ymin,
double& ymax,
double& zmin,
double& zmax);
798 vtkSetClampMacro(Ratio,
double, 0.001, 100.0);
799 vtkGetMacro(Ratio,
double);
807 vtkSetClampMacro(PolarArcResolutionPerDegree,
double, VTK_MINIMUM_POLAR_ARC_RESOLUTION_PER_DEG,
808 VTK_MAXIMUM_POLAR_ARC_RESOLUTION_PER_DEG);
809 vtkGetMacro(PolarArcResolutionPerDegree,
double);
869 double a,
double angleEllipseRad,
double tickSize,
vtkPoints* tickPts);
932 double Pole[3] = { 0.0, 0.0, 0.0 };
937 int NumberOfRadialAxes = 0;
943 int RequestedNumberOfRadialAxes = 0;
948 int NumberOfPolarAxes = 5;
954 int RequestedNumberOfPolarAxes = 5;
964 double PolarArcResolutionPerDegree = 0.2;
969 double Range[2] = { 0.0, 10.0 };
974 double DeltaRangeMinor = 0.5;
979 double DeltaRangeMajor = 1.0;
984 double DeltaRangePolarAxes = 0.0;
990 double RequestedDeltaRangePolarAxes = 0.0;
995 double DeltaAngleMinor = 22.5;
1000 double DeltaAngleMajor = 45.0;
1005 double DeltaAngleRadialAxes = 45.0;
1011 double RequestedDeltaAngleRadialAxes = 45.0;
1016 double MinimumRadius = 0.0;
1021 double MaximumRadius = 1.0;
1031 double MinimumAngle = 0.0;
1036 double MaximumAngle = 90.0;
1041 double SmallestVisiblePolarAngle = 0.5;
1070 std::vector<vtkSmartPointer<vtkAxisActor>> RadialAxes;
1077 std::string PolarAxisTitle =
"Radial Distance";
1078 char* PolarLabelFormat =
nullptr;
1084 char* RadialAngleFormat =
nullptr;
1089 bool RadialUnits =
true;
1094 bool EnableDistanceLOD =
true;
1099 double DistanceLODThreshold = 0.7;
1104 bool EnableViewAngleLOD =
true;
1110 double ViewAngleLODThreshold = 0.3;
1116 bool PolarAxisVisibility =
true;
1117 bool PolarTitleVisibility =
true;
1118 bool PolarLabelVisibility =
true;
1133 bool PolarTickVisibility =
true;
1141 bool ArcTicksOriginToPolarAxis =
true;
1149 bool RadialAxesOriginToPolarAxis =
true;
1154 bool AxisTickVisibility =
true, AxisMinorTickVisibility =
false;
1159 bool AxisTickMatchesPolarAxes =
true;
1164 bool ArcTickVisibility =
true, ArcMinorTickVisibility =
false;
1169 bool ArcTickMatchesRadialAxes =
true;
1174 double PolarAxisMajorTickSize = 0.0, LastRadialAxisMajorTickSize = 0.0, ArcMajorTickSize = 0.0;
1179 double PolarAxisTickRatioSize = 0.3, LastAxisTickRatioSize = 0.3, ArcTickRatioSize = 0.3;
1184 double TickRatioRadiusSize = 0.02;
1189 double PolarAxisMajorTickThickness = 1.0, LastRadialAxisMajorTickThickness = 1.0,
1190 ArcMajorTickThickness = 1.0;
1195 double PolarAxisTickRatioThickness = 0.5, LastAxisTickRatioThickness = 0.5,
1196 ArcTickRatioThickness = 0.5;
1202 bool RadialAxesVisibility =
true;
1203 bool RadialTitleVisibility =
true;
1209 int RadialAxisTitleLocation = VTK_TITLE_BOTTOM;
1214 int PolarAxisTitleLocation = VTK_TITLE_BOTTOM;
1220 int ExponentLocation = VTK_EXPONENT_LABELS;
1225 bool PolarArcsVisibility =
true;
1230 bool DrawRadialGridlines =
true;
1235 bool DrawPolarArcsGridlines =
true;
1298 double ScreenSize = 10.0;
1304 double PolarTitleOffset[2] = { 20.0, 10.0 }, RadialTitleOffset[2] = { 20.0, 0.0 };
1305 double PolarLabelOffset = 10.0, PolarExponentOffset = 5.0;
1308 static constexpr int VTK_MAXIMUM_NUMBER_OF_POLAR_AXES = 20;
1309 static constexpr int VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES = 50;
1310 static constexpr double VTK_MINIMUM_POLAR_ARC_RESOLUTION_PER_DEG = 0.05;
1311 static constexpr double VTK_MAXIMUM_POLAR_ARC_RESOLUTION_PER_DEG = 100.0;
1317VTK_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()
Instantiate object with label format "6.3g" and the number of labels per axis set to 3.
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 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.
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.
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