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
48 #include "vtkRenderingAnnotationModule.h"
86 virtual void SetPole(
double,
double,
double);
87 vtkGetVector3Macro(Pole,
double);
96 vtkGetMacro(Log,
bool);
123 vtkGetMacro(AutoSubdividePolarAxis,
bool);
131 vtkSetVector2Macro(Range,
double);
132 vtkGetVectorMacro(Range,
double, 2);
140 vtkGetMacro(MinimumRadius,
double);
148 vtkGetMacro(MaximumRadius,
double);
157 vtkGetMacro(AutoScaleRadius,
bool);
165 vtkGetMacro(MinimumAngle,
double);
173 vtkGetMacro(MaximumAngle,
double);
182 vtkSetClampMacro(SmallestVisiblePolarAngle,
double, 0., 5.);
183 vtkGetMacro(SmallestVisiblePolarAngle,
double);
193 vtkGetMacro(TickLocation,
int);
201 vtkGetMacro(RadialUnits,
bool);
212 vtkGetMacro(ScreenSize,
double);
229 vtkSetStringMacro(PolarAxisTitle);
237 vtkSetStringMacro(PolarLabelFormat);
243 VTK_EXPONENT_BOTTOM = 0,
244 VTK_EXPONENT_EXTERN = 1,
245 VTK_EXPONENT_LABELS = 2
262 vtkSetStringMacro(RadialAngleFormat);
278 vtkGetMacro(EnableDistanceLOD,
int);
285 vtkSetClampMacro(DistanceLODThreshold,
double, 0.0, 1.0);
286 vtkGetMacro(DistanceLODThreshold,
double);
294 vtkGetMacro(EnableViewAngleLOD,
int);
301 vtkSetClampMacro(ViewAngleLODThreshold,
double, 0., 1.);
302 vtkGetMacro(ViewAngleLODThreshold,
double);
310 vtkGetMacro(PolarAxisVisibility,
int);
319 vtkGetMacro(DrawRadialGridlines,
int);
328 vtkGetMacro(DrawPolarArcsGridlines,
int);
337 vtkGetMacro(PolarTitleVisibility,
int);
343 VTK_TITLE_BOTTOM = 0,
352 vtkSetClampMacro(RadialAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
353 vtkGetMacro(RadialAxisTitleLocation,
int);
361 vtkSetClampMacro(PolarAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
362 vtkGetMacro(PolarAxisTitleLocation,
int);
370 vtkGetMacro(PolarLabelVisibility,
int);
381 vtkGetMacro(ArcTicksOriginToPolarAxis,
int);
392 vtkGetMacro(RadialAxesOriginToPolarAxis,
int);
401 vtkGetMacro(PolarTickVisibility,
int);
410 vtkGetMacro(AxisTickVisibility,
int);
419 vtkGetMacro(AxisMinorTickVisibility,
int);
428 vtkGetMacro(ArcTickVisibility,
int);
437 vtkGetMacro(ArcMinorTickVisibility,
int);
446 vtkGetMacro(ArcMajorTickSize,
double);
454 vtkGetMacro(PolarAxisMajorTickSize,
double);
462 vtkGetMacro(LastRadialAxisMajorTickSize,
double);
470 vtkGetMacro(PolarAxisTickRatioSize,
double);
478 vtkGetMacro(LastAxisTickRatioSize,
double);
486 vtkGetMacro(ArcTickRatioSize,
double);
494 vtkGetMacro(PolarAxisMajorTickThickness,
double);
502 vtkGetMacro(LastRadialAxisMajorTickThickness,
double);
510 vtkGetMacro(ArcMajorTickThickness,
double);
518 vtkGetMacro(PolarAxisTickRatioThickness,
double);
526 vtkGetMacro(LastAxisTickRatioThickness,
double);
534 vtkGetMacro(ArcTickRatioThickness,
double);
542 vtkGetMacro(DeltaRangeMajor,
double);
550 vtkGetMacro(DeltaRangeMinor,
double);
558 vtkGetMacro(DeltaAngleMajor,
double);
566 vtkGetMacro(DeltaAngleMinor,
double);
574 vtkGetMacro(DeltaAngleRadialAxes,
double);
584 vtkGetMacro(RadialAxesVisibility,
int);
593 vtkGetMacro(RadialTitleVisibility,
int);
602 vtkGetMacro(PolarArcsVisibility,
int);
693 vtkSetVector6Macro(Bounds,
double);
695 void GetBounds(
double& xmin,
double& xmax,
double& ymin,
double& ymax,
696 double& zmin,
double& zmax);
704 vtkSetClampMacro(Ratio,
double, 0.001, 100.0);
705 vtkGetMacro(Ratio,
double);
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
represent and manipulate 3D points
create an actor of a polar axes -
bool AutoScaleRadius
Auto-scale polar radius (with respect to average length scale of x-y bounding box).
virtual void SetCamera(vtkCamera *)
Set/Get the camera to perform scaling and translation of the vtkPolarAxesActor.
bool AutoSubdividePolarAxis
Whether the number of polar axis ticks and arcs should be automatically calculated.
virtual void SetPolarAxisProperty(vtkProperty *)
Get/Set polar axis actor properties.
void CalculateBounds()
Calculate bounds based on maximum radius and angular sector.
vtkActor * PolarArcsActor
void GetBounds(double bounds[6])
vtkTextProperty * PolarAxisTitleTextProperty
Text properties of polar axis title and labels.
void AutoScale(vtkViewport *viewport)
Automatically rescale titles and labels NB: Current implementation only for perspective projections.
int DrawPolarArcsGridlines
Visibility of the inner arcs (overriden to 0 if PolarArcsVisibility is set to 0)
vtkActor * ArcMinorTickActor
virtual void SetNumberOfPolarAxisTicks(int)
Set/Get a number of ticks that one would like to display along polar axis NB: it modifies DeltaRangeM...
vtkProperty * PolarAxisProperty
General properties of polar axis Behavior may be override by polar axis ticks 's actor property.
int EnableDistanceLOD
If enabled the actor will not be visible at a certain distance from the camera.
int EnableViewAngleLOD
If enabled the actor will not be visible at a certain view angle.
vtkPoints * ArcMajorTickPts
Keep the arc major ticks vtkPoints instances.
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.
vtkTextProperty * PolarAxisLabelTextProperty
virtual void SetSecondaryPolarArcsProperty(vtkProperty *p)
Get/Set secondary polar arcs actors property.
virtual void SetSecondaryRadialAxesProperty(vtkProperty *p)
Get/Set secondary radial axes actors properties.
double ArcMajorTickThickness
double DeltaAngleMinor
Angle between 2 minor ticks on the last arc.
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.
double MaximumRadius
Maximum polar radius.
virtual void SetMinimumRadius(double)
Set/Get the minimal radius of the polar coordinates.
double MinimumRadius
Minimum polar radius.
vtkProperty * GetPolarArcsProperty()
double MaximumAngle
Maximum polar angle Default: 90.
vtkPolyData * ArcMinorTickPolyData
void GetBounds(double &xmin, double &xmax, double &ymin, double &ymax, double &zmin, double &zmax)
vtkProperty * GetSecondaryPolarArcsProperty()
double ArcTickRatioThickness
vtkProperty * SecondaryRadialAxesProperty
General properties of radial axes.
void GetSignificantPartFromValues(vtkStringArray *valuesStr, std::list< double > &valuesList)
Yield a string array whith the float part of each values.
int NumberOfRadialAxes
Number of radial axes.
int PolarAxisTitleLocation
Define the alignement of the title related to the polar axis.
vtkAxisActor * PolarAxis
Control variables for polar axis.
vtkTextProperty * SecondaryRadialAxesTextProperty
Text properties of secondary radial axes.
virtual void SetMinimumAngle(double)
Set/Get the minimum radius of the polar coordinates (in degrees).
double ViewAngleLODThreshold
This determines at what view angle to geometry will make the geometry not visibile.
double * GetBounds()
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
virtual void SetPole(double[3])
Explicitly specify the coordinate of the pole.
vtkPolyData * ArcTickPolyData
vtk object for arc Ticks
double DeltaAngleRadialAxes
Angle between 2 radial Axes.
void AutoComputeTicksProperties()
Set Range and PolarAxis members value to build axis ticks this fonction doesn't actually build PolarA...
void BuildLabelsLog()
Define label values.
int PolarTickVisibility
Hold visibility for all present ticks.
bool RadialUnits
Display angle units (degrees) to label radial axes Default is true.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
int TickLocation
Describes the tick orientation for the graph elements involved by this property.
void BuildArcTicks()
Build Arc ticks.
void BuildRadialAxes()
Build requested number of radial axes with respect to specified pole.
int PolarArcsVisibility
Visibility of polar arcs.
virtual int RenderOverlay(vtkViewport *)
void CreateRadialAxes(int axisCount)
Create requested number of type X axes.
double FSign(double, double)
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.
int DrawRadialGridlines
Visibility of the inner axes (overriden to 0 if RadialAxesVisibility is set to 0)
int RadialTitleVisibility
bool CheckMembersConsistency()
Check consistency of vtkPolarAxesActor members.
int GetNumberOfPolarAxisTicks()
int RadialAxesOriginToPolarAxis
If On, the radial axes are drawn from the angle of the polarAxis (i.e.
void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this actor.
double DistanceLODThreshold
Default is 0.80 This determines at what fraction of camera far clip range, actor is not visible.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
double DeltaAngleMajor
Angle between 2 major ticks on the last arc.
double DeltaRangeMinor
Step between 2 minor ticks, in range value (values displayed on the axis).
double DeltaRangeMajor
Step between 2 major ticks, in range value (values displayed on the axis).
double TitleScale
Title scale factor.
int ArcTicksOriginToPolarAxis
If On, the ticks are drawn from the angle of the polarAxis (i.e.
int PolarAxisVisibility
Visibility of polar axis and its title, labels, ticks (major only)
vtkPolyDataMapper * ArcTickPolyDataMapper
void BuildPolarAxisLabelsArcsLog()
Build labels and arcs with log scale axis.
virtual void SetSecondaryRadialAxesTextProperty(vtkTextProperty *p)
Set/Get the secondary radial axes text property.
vtkPolyDataMapper * SecondaryPolarArcsMapper
double Ratio
Ratio for elliptical representation of the polar axes actor.
int RadialAxesVisibility
Visibility of radial axes and their titles.
vtkActor * SecondaryPolarArcsActor
vtkPolyDataMapper * ArcMinorTickPolyDataMapper
char * PolarAxisTitle
Title to be used for the polar axis NB: Non-polar radial axes use the polar angle as title and have n...
void SetCommonAxisAttributes(vtkAxisActor *)
Send attributes which are common to all axes, both polar and radial.
int AxisMinorTickVisibility
void SetUse2DMode(int val)
Enable/Disable labels 2D mode (always facing the camera).
virtual void SetMaximumRadius(double)
Set/Get the maximum radius of the polar coordinates.
double FFix(double)
Convenience methods.
static vtkPolarAxesActor * New()
Instantiate object with label format "6.3g" and the number of labels per axis set to 3.
virtual void SetPole(double, double, double)
void SetPolarAxisAttributes(vtkAxisActor *)
Set properties specific to PolarAxis.
vtkAxisActor ** RadialAxes
Control variables for non-polar radial axes.
double SmallestVisiblePolarAngle
Smallest radial angle distinguishable from polar axis.
double ScreenSize
Text screen size.
vtkPolyDataMapper * PolarArcsMapper
int RadialAxisTitleLocation
Define the alignement of the title related to the radial axis.
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).
int ArcMinorTickVisibility
double LabelScale
Label scale factor.
int ExponentLocation
Define the location of the exponent of the labels values, located on the polar axis.
vtkProperty * LastRadialAxisProperty
General properties of last radial axis.
vtkPolyData * SecondaryPolarArcs
Structures for secondary polar arcs.
double MinimumAngle
Minimum polar angle Default: 0.
vtkPoints * ArcMinorTickPts
Keep the arc minor ticks vtkPoints instances.
virtual void SetPolarAxisLabelTextProperty(vtkTextProperty *p)
Set/Get the polar axis labels text property.
vtkTextProperty * LastRadialAxisTextProperty
Text properties of last radial axis.
vtkCamera * Camera
Camera attached to the polar axes system.
bool Log
Enable/Disable log scale Default: 0.
virtual void SetNumberOfRadialAxes(vtkIdType)
Gets/Sets the number of radial axes.
char * RadialAngleFormat
String to format angle values displayed on the radial axes.
virtual int RenderOpaqueGeometry(vtkViewport *)
Draw the polar axes.
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
a vtkAbstractArray subclass for strings
represent text properties.
record modification and/or execution time
abstract specification for Viewports
window superclass for vtkRenderWindow
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.