Go to the documentation of this file.
39 #ifndef vtkPolarAxesActor_h
40 #define vtkPolarAxesActor_h
42 #define VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES 50
43 #define VTK_DEFAULT_NUMBER_OF_RADIAL_AXES 5
44 #define VTK_MAXIMUM_NUMBER_OF_POLAR_AXIS_TICKS 200
45 #define VTK_MAXIMUM_RATIO 1000.0
46 #define VTK_POLAR_ARC_RESOLUTION_PER_DEG 0.2
50 #include "vtkRenderingAnnotationModule.h"
86 virtual void SetPole(
double,
double,
double);
87 vtkGetVector3Macro(Pole,
double);
95 vtkSetMacro(Log,
bool);
96 vtkGetMacro(Log,
bool);
97 vtkBooleanMacro(Log,
bool);
122 vtkSetMacro(AutoSubdividePolarAxis,
bool);
123 vtkGetMacro(AutoSubdividePolarAxis,
bool);
124 vtkBooleanMacro(AutoSubdividePolarAxis,
bool);
131 vtkSetVector2Macro(Range,
double);
132 vtkGetVectorMacro(Range,
double, 2);
140 vtkGetMacro(MinimumRadius,
double);
148 vtkGetMacro(MaximumRadius,
double);
156 vtkGetMacro(MinimumAngle,
double);
164 vtkGetMacro(MaximumAngle,
double);
173 vtkSetClampMacro(SmallestVisiblePolarAngle,
double, 0., 5.);
174 vtkGetMacro(SmallestVisiblePolarAngle,
double);
184 vtkGetMacro(TickLocation,
int);
191 vtkSetMacro(RadialUnits,
bool);
192 vtkGetMacro(RadialUnits,
bool);
202 vtkSetMacro(ScreenSize,
double);
203 vtkGetMacro(ScreenSize,
double);
220 vtkSetStringMacro(PolarAxisTitle);
221 vtkGetStringMacro(PolarAxisTitle);
228 vtkSetStringMacro(PolarLabelFormat);
229 vtkGetStringMacro(PolarLabelFormat);
234 VTK_EXPONENT_BOTTOM = 0,
235 VTK_EXPONENT_EXTERN = 1,
236 VTK_EXPONENT_LABELS = 2
253 vtkSetStringMacro(RadialAngleFormat);
254 vtkGetStringMacro(RadialAngleFormat);
268 vtkSetMacro(EnableDistanceLOD,
int);
269 vtkGetMacro(EnableDistanceLOD,
int);
276 vtkSetClampMacro(DistanceLODThreshold,
double, 0.0, 1.0);
277 vtkGetMacro(DistanceLODThreshold,
double);
284 vtkSetMacro(EnableViewAngleLOD,
int);
285 vtkGetMacro(EnableViewAngleLOD,
int);
292 vtkSetClampMacro(ViewAngleLODThreshold,
double, 0., 1.);
293 vtkGetMacro(ViewAngleLODThreshold,
double);
334 VTK_TITLE_BOTTOM = 0,
343 vtkSetClampMacro(RadialAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
344 vtkGetMacro(RadialAxisTitleLocation,
int);
352 vtkSetClampMacro(PolarAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
353 vtkGetMacro(PolarAxisTitleLocation,
int);
438 vtkSetMacro(ArcMajorTickSize,
double);
439 vtkGetMacro(ArcMajorTickSize,
double);
446 vtkSetMacro(PolarAxisMajorTickSize,
double);
447 vtkGetMacro(PolarAxisMajorTickSize,
double);
454 vtkSetMacro(LastRadialAxisMajorTickSize,
double);
455 vtkGetMacro(LastRadialAxisMajorTickSize,
double);
462 vtkSetMacro(PolarAxisTickRatioSize,
double);
463 vtkGetMacro(PolarAxisTickRatioSize,
double);
470 vtkSetMacro(LastAxisTickRatioSize,
double);
471 vtkGetMacro(LastAxisTickRatioSize,
double);
478 vtkSetMacro(ArcTickRatioSize,
double);
479 vtkGetMacro(ArcTickRatioSize,
double);
486 vtkSetMacro(PolarAxisMajorTickThickness,
double);
487 vtkGetMacro(PolarAxisMajorTickThickness,
double);
494 vtkSetMacro(LastRadialAxisMajorTickThickness,
double);
495 vtkGetMacro(LastRadialAxisMajorTickThickness,
double);
502 vtkSetMacro(ArcMajorTickThickness,
double);
503 vtkGetMacro(ArcMajorTickThickness,
double);
510 vtkSetMacro(PolarAxisTickRatioThickness,
double);
511 vtkGetMacro(PolarAxisTickRatioThickness,
double);
518 vtkSetMacro(LastAxisTickRatioThickness,
double);
519 vtkGetMacro(LastAxisTickRatioThickness,
double);
526 vtkSetMacro(ArcTickRatioThickness,
double);
527 vtkGetMacro(ArcTickRatioThickness,
double);
534 vtkSetMacro(DeltaRangeMajor,
double);
535 vtkGetMacro(DeltaRangeMajor,
double);
542 vtkSetMacro(DeltaRangeMinor,
double);
543 vtkGetMacro(DeltaRangeMinor,
double);
550 vtkSetMacro(DeltaAngleMajor,
double);
551 vtkGetMacro(DeltaAngleMajor,
double);
558 vtkSetMacro(DeltaAngleMinor,
double);
559 vtkGetMacro(DeltaAngleMinor,
double);
566 vtkSetMacro(DeltaAngleRadialAxes,
double);
567 vtkGetMacro(DeltaAngleRadialAxes,
double);
686 vtkSetVector6Macro(Bounds,
double);
689 double& xmin,
double& xmax,
double& ymin,
double& ymax,
double& zmin,
double& zmax);
697 vtkSetClampMacro(Ratio,
double, 0.001, 100.0);
698 vtkGetMacro(Ratio,
double);
764 double a,
double angleEllipseRad,
double tickSize,
vtkPoints* tickPts);
map vtkPolyData to graphics primitives
represent and manipulate 3D points
virtual void SetSecondaryRadialAxesProperty(vtkProperty *p)
Get/Set secondary radial axes actors properties.
vtkTextProperty * PolarAxisLabelTextProperty
void BuildArcTicks()
Build Arc ticks.
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.
int EnableDistanceLOD
If enabled the actor will not be visible at a certain distance from the camera.
double DeltaRangeMinor
Step between 2 minor ticks, in range value (values displayed on the axis).
int ArcTicksOriginToPolarAxis
If On, the ticks are drawn from the angle of the polarAxis (i.e.
double DistanceLODThreshold
Default is 0.80 This determines at what fraction of camera far clip range, actor is not visible.
double MaximumRadius
Maximum polar radius.
void BuildAxes(vtkViewport *)
Build the axes.
double MaximumAngle
Maximum polar angle Default: 90.
virtual void ComputeDeltaAngleRadialAxes(vtkIdType)
Compute delta angle of radial axes.
void CreateRadialAxes(int axisCount)
Create requested number of type X axes.
void AutoScale(vtkViewport *viewport)
Automatically rescale titles and labels NB: Current implementation only for perspective projections.
double ComputeIdealStep(int subDivsRequired, double rangeLength, int maxSubDivs=1000)
return a step attempting to be as rounded as possible according to input parameters
vtkPolyData * SecondaryPolarArcs
Structures for secondary polar arcs.
double FFix(double)
Convenience methods.
Create an axis with tick marks and labels.
bool Log
Enable/Disable log scale Default: 0.
virtual void SetPolarAxisTitleTextProperty(vtkTextProperty *p)
Set/Get the polar axis title text property.
char * PolarAxisTitle
Title to be used for the polar axis NB: Non-polar radial axes use the polar angle as title and have n...
#define VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES
vtkPolyData * ArcTickPolyData
vtk object for arc Ticks
virtual void SetSecondaryPolarArcsProperty(vtkProperty *p)
Get/Set secondary polar arcs actors property.
double MinimumAngle
Minimum polar angle Default: 0.
virtual void SetPole(double, double, double)
vtkProperty * SecondaryRadialAxesProperty
General properties of radial axes.
int TickLocation
Describes the tick orientation for the graph elements involved by this property.
static double ComputeEllipseAngle(double angleInDegrees, double ratio)
convert section angle to an angle applied to ellipse equation.
vtkProperty * GetSecondaryPolarArcsProperty()
vtkPolyDataMapper * ArcTickPolyDataMapper
record modification and/or execution time
vtkTypeBool PolarAxisVisibility
Visibility of polar axis and its title, labels, ticks (major only)
bool AutoScaleRadius
Auto-scale polar radius (with respect to average length scale of x-y bounding box).
double PolarAxisMajorTickSize
Defines the length of the ticks located on the last arc.
vtkActor * SecondaryPolarArcsActor
void GetSignificantPartFromValues(vtkStringArray *valuesStr, std::list< double > &valuesList)
Yield a string array with the float part of each values.
vtkPolyDataMapper * PolarArcsMapper
double ScreenSize
Text screen size.
vtkActor * ArcMinorTickActor
vtkAxisActor ** RadialAxes
Control variables for non-polar radial axes.
double SmallestVisiblePolarAngle
Smallest radial angle distinguishable from polar axis.
virtual void SetLastRadialAxisProperty(vtkProperty *p)
Get/Set last radial axis actor properties.
vtkTypeBool PolarTickVisibility
Hold visibility for all present ticks.
void BuildLabelsLog()
Define label values.
double Ratio
Ratio for elliptical representation of the polar axes actor.
double FSign(double, double)
window superclass for vtkRenderWindow
double PolarAxisMajorTickThickness
Defines the tickness of the major ticks.
double * GetBounds() override
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
vtkProperty * GetPolarArcsProperty()
int NumberOfRadialAxes
Number of radial axes.
vtkTextProperty * PolarAxisTitleTextProperty
Text properties of polar axis title and labels.
vtkActor * PolarArcsActor
double DeltaAngleMajor
Angle between 2 major ticks on the last arc.
static vtkPolarAxesActor * New()
Instantiate object with label format "6.3g" and the number of labels per axis set to 3.
virtual void SetPolarArcsProperty(vtkProperty *p)
Get/Set principal polar arc actor property.
virtual void SetPolarAxisLabelTextProperty(vtkTextProperty *p)
Set/Get the polar axis labels text property.
virtual void SetMaximumRadius(double)
Set/Get the maximum radius of the polar coordinates.
vtkTypeBool RadialAxesVisibility
Visibility of radial axes and their titles.
virtual void SetMinimumRadius(double)
Set/Get the minimal radius of the polar coordinates.
vtkProperty * PolarAxisProperty
General properties of polar axis Behavior may be override by polar axis ticks 's actor property.
virtual void SetCamera(vtkCamera *)
Set/Get the camera to perform scaling and translation of the vtkPolarAxesActor.
vtkTypeBool DrawPolarArcsGridlines
Visibility of the inner arcs (overridden to 0 if PolarArcsVisibility is set to 0)
void BuildPolarAxisLabelsArcs()
Build polar axis labels and arcs with respect to specified pole.
represents an object (geometry & properties) in a rendered scene
virtual void SetNumberOfPolarAxisTicks(int)
Set/Get a number of ticks that one would like to display along polar axis NB: it modifies DeltaRangeM...
a simple class to control print indentation
virtual void SetPolarAxisProperty(vtkProperty *)
Get/Set polar axis actor properties.
void CalculateBounds()
Calculate bounds based on maximum radius and angular sector.
a virtual camera for 3D rendering
int RenderOpaqueGeometry(vtkViewport *) override
Draw the polar axes.
vtkTypeBool AxisTickVisibility
Hold visibility of major/minor ticks for the polar axis and the last radial axis.
bool CheckMembersConsistency()
Check consistency of vtkPolarAxesActor members.
virtual void SetSecondaryRadialAxesTextProperty(vtkTextProperty *p)
Set/Get the secondary radial axes text property.
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.
vtkPolyData * ArcMinorTickPolyData
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.
void BuildPolarAxisLabelsArcsLog()
Build labels and arcs with log scale axis.
double DeltaAngleMinor
Angle between 2 minor ticks on the last arc.
void AutoComputeTicksProperties()
Set Range and PolarAxis members value to build axis ticks this function doesn't actually build PolarA...
void SetPolarAxisAttributes(vtkAxisActor *)
Set properties specific to PolarAxis.
vtkTypeBool PolarTitleVisibility
vtkTypeBool PolarLabelVisibility
int GetNumberOfPolarAxisTicks()
vtkTypeBool RadialTitleVisibility
abstract specification for Viewports
virtual void SetMaximumAngle(double)
Set/Get the maximum radius of the polar coordinates (in degrees).
int RequestedNumberOfRadialAxes
Requested Number of radial axes.
double PolarAxisTickRatioThickness
Set the ratios between major tick thickness for each ticks location.
create an actor of a polar axes -
represent text properties.
vtkPolyDataMapper * ArcMinorTickPolyDataMapper
int RenderOverlay(vtkViewport *) override
void SetUse2DMode(int val)
Enable/Disable labels 2D mode (always facing the camera).
vtkTypeBool PolarArcsVisibility
Visibility of polar arcs.
int EnableViewAngleLOD
If enabled the actor will not be visible at a certain view angle.
void BuildRadialAxes()
Build requested number of radial axes with respect to specified pole.
virtual void SetPole(double[3])
Explicitly specify the coordinate of the pole.
~vtkPolarAxesActor() override
void GetBounds(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax)
virtual void SetLastRadialAxisTextProperty(vtkTextProperty *p)
Set/Get the last radial axis text property.
vtkProperty * LastRadialAxisProperty
General properties of last radial axis.
concrete dataset represents vertices, lines, polygons, and triangle strips
char * RadialAngleFormat
String to format angle values displayed on the radial axes.
bool RadialUnits
Display angle units (degrees) to label radial axes Default is true.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
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.
a vtkAbstractArray subclass for strings
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
void GetBounds(double bounds[6])
double LabelScale
Label scale factor.
represent surface properties of a geometric object
int PolarAxisTitleLocation
Define the alignment of the title related to the polar axis.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAxisActor * PolarAxis
Control variables for polar axis.
double DeltaAngleRadialAxes
Angle between 2 radial Axes.
double TitleScale
Title scale factor.
std::string FindExponentAndAdjustValues(std::list< double > &valuesList)
Find a common exponent for label values.
double ViewAngleLODThreshold
This determines at what view angle to geometry will make the geometry not visible.
vtkTextProperty * LastRadialAxisTextProperty
Text properties of last radial axis.
vtkCamera * Camera
Camera attached to the polar axes system.
void SetCommonAxisAttributes(vtkAxisActor *)
Send attributes which are common to all axes, both polar and radial.
vtkTextProperty * SecondaryRadialAxesTextProperty
Text properties of secondary radial axes.
virtual void SetMinimumAngle(double)
Set/Get the minimum radius of the polar coordinates (in degrees).
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 MinimumRadius
Minimum polar radius.
double DeltaRangeMajor
Step between 2 major ticks, in range value (values displayed on the axis).
vtkPoints * ArcMinorTickPts
Keep the arc minor ticks vtkPoints instances.
vtkPolyDataMapper * SecondaryPolarArcsMapper