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" 85 virtual void SetPole(
double[3]);
86 virtual void SetPole(
double,
double,
double);
87 vtkGetVector3Macro(Pole,
double);
96 vtkGetMacro(Log,
bool);
104 virtual void SetNumberOfRadialAxes(
vtkIdType);
105 vtkGetMacro(NumberOfRadialAxes,
vtkIdType);
113 virtual void SetNumberOfPolarAxisTicks(
int);
114 int GetNumberOfPolarAxisTicks();
123 vtkGetMacro(AutoSubdividePolarAxis,
bool);
131 vtkSetVector2Macro(Range,
double);
132 vtkGetVectorMacro(Range,
double, 2);
139 virtual void SetMinimumRadius(
double);
140 vtkGetMacro(MinimumRadius,
double);
147 virtual void SetMaximumRadius(
double);
148 vtkGetMacro(MaximumRadius,
double);
155 virtual void SetMinimumAngle(
double);
156 vtkGetMacro(MinimumAngle,
double);
163 virtual void SetMaximumAngle(
double);
164 vtkGetMacro(MaximumAngle,
double);
173 vtkSetClampMacro(SmallestVisiblePolarAngle,
double, 0., 5.);
174 vtkGetMacro(SmallestVisiblePolarAngle,
double);
184 vtkGetMacro(TickLocation,
int);
192 vtkGetMacro(RadialUnits,
bool);
203 vtkGetMacro(ScreenSize,
double);
220 vtkSetStringMacro(PolarAxisTitle);
228 vtkSetStringMacro(PolarLabelFormat);
234 VTK_EXPONENT_BOTTOM = 0,
235 VTK_EXPONENT_EXTERN = 1,
236 VTK_EXPONENT_LABELS = 2
245 vtkSetClampMacro(
ExponentLocation,
int, VTK_EXPONENT_BOTTOM, VTK_EXPONENT_LABELS);
253 vtkSetStringMacro(RadialAngleFormat);
269 vtkGetMacro(EnableDistanceLOD,
int);
276 vtkSetClampMacro(DistanceLODThreshold,
double, 0.0, 1.0);
277 vtkGetMacro(DistanceLODThreshold,
double);
285 vtkGetMacro(EnableViewAngleLOD,
int);
292 vtkSetClampMacro(ViewAngleLODThreshold,
double, 0., 1.);
293 vtkGetMacro(ViewAngleLODThreshold,
double);
301 vtkGetMacro(PolarAxisVisibility,
int);
310 vtkGetMacro(DrawRadialGridlines,
int);
319 vtkGetMacro(DrawPolarArcsGridlines,
int);
328 vtkGetMacro(PolarTitleVisibility,
int);
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);
361 vtkGetMacro(PolarLabelVisibility,
int);
372 vtkGetMacro(ArcTicksOriginToPolarAxis,
int);
383 vtkGetMacro(RadialAxesOriginToPolarAxis,
int);
392 vtkGetMacro(PolarTickVisibility,
int);
401 vtkGetMacro(AxisTickVisibility,
int);
410 vtkGetMacro(AxisMinorTickVisibility,
int);
419 vtkGetMacro(ArcTickVisibility,
int);
428 vtkGetMacro(ArcMinorTickVisibility,
int);
437 vtkGetMacro(ArcMajorTickSize,
double);
445 vtkGetMacro(PolarAxisMajorTickSize,
double);
453 vtkGetMacro(LastRadialAxisMajorTickSize,
double);
461 vtkGetMacro(PolarAxisTickRatioSize,
double);
469 vtkGetMacro(LastAxisTickRatioSize,
double);
477 vtkGetMacro(ArcTickRatioSize,
double);
485 vtkGetMacro(PolarAxisMajorTickThickness,
double);
492 vtkSetMacro(LastRadialAxisMajorTickThickness,
double);
493 vtkGetMacro(LastRadialAxisMajorTickThickness,
double);
501 vtkGetMacro(ArcMajorTickThickness,
double);
509 vtkGetMacro(PolarAxisTickRatioThickness,
double);
517 vtkGetMacro(LastAxisTickRatioThickness,
double);
525 vtkGetMacro(ArcTickRatioThickness,
double);
533 vtkGetMacro(DeltaRangeMajor,
double);
541 vtkGetMacro(DeltaRangeMinor,
double);
549 vtkGetMacro(DeltaAngleMajor,
double);
557 vtkGetMacro(DeltaAngleMinor,
double);
565 vtkGetMacro(DeltaAngleRadialAxes,
double);
575 vtkGetMacro(RadialAxesVisibility,
int);
584 vtkGetMacro(RadialTitleVisibility,
int);
593 vtkGetMacro(PolarArcsVisibility,
int);
601 void SetUse2DMode(
int val);
649 virtual void SetLastRadialAxisProperty(
vtkProperty* p);
650 vtkGetObjectMacro(LastRadialAxisProperty,
vtkProperty);
657 virtual void SetSecondaryRadialAxesProperty(
vtkProperty* p);
658 vtkGetObjectMacro(SecondaryRadialAxesProperty,
vtkProperty);
673 virtual void SetSecondaryPolarArcsProperty(
vtkProperty* p);
684 vtkSetVector6Macro(Bounds,
double);
686 void GetBounds(
double& xmin,
double& xmax,
double& ymin,
double& ymax,
687 double& zmin,
double& zmax);
695 vtkSetClampMacro(Ratio,
double, 0.001, 100.0);
696 vtkGetMacro(Ratio,
double);
706 bool CheckMembersConsistency();
717 void CalculateBounds();
732 void CreateRadialAxes(
int axisCount);
737 void BuildRadialAxes();
744 void AutoComputeTicksProperties();
749 double ComputeIdealStep(
int subDivsRequired,
double rangeLength,
int maxSubDivs = 1000);
754 void BuildArcTicks();
759 void StoreTicksPtsFromParamEllipse(
double a,
double angleEllipseRad,
double tickSize,
vtkPoints* tickPts);
764 void BuildPolarAxisLabelsArcs();
769 void BuildPolarAxisLabelsArcsLog();
774 void BuildLabelsLog();
776 void BuildPolarArcsLog();
781 std::string FindExponentAndAdjustValues(std::list<double>& valuesList);
786 void GetSignificantPartFromValues(
vtkStringArray* valuesStr, std::list<double>& valuesList);
793 double FSign(
double,
double);
806 static double ComputeEllipseAngle(
double angleInDegrees,
double ratio);
vtkProperty * SecondaryRadialAxesProperty
General properties of radial axes.
double MinimumRadius
Minimum polar radius.
int PolarAxisTitleLocation
Define the alignement 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...
abstract specification for Viewports
represent surface properties of a geometric object
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Draw the polar axes.
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.
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.
vtkActor * SecondaryPolarArcsActor
Structures for secondary polar arcs.
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.
int DrawPolarArcsGridlines
Visibility of the inner arcs (overriden to 0 if PolarArcsVisibility is set to 0)
int PolarArcsVisibility
Visibility of polar arcs.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkAxisActor ** RadialAxes
Control variables for non-polar radial axes.
double PolarAxisMajorTickSize
Defines the length of the ticks located on the last arc.
vtkActor * PolarArcsActor
int PolarTickVisibility
Hold visibility for all present ticks.
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...
int PolarAxisVisibility
Visibility of polar axis and its title, labels, ticks (major only)
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.
int RadialAxisTitleLocation
Define the alignement 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
a virtual camera for 3D rendering
vtkPolyDataMapper * ArcMinorTickPolyDataMapper
vtk object for arc Ticks
int NumberOfRadialAxes
Number of radial axes.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
int PolarLabelVisibility
Visibility of polar axis and its title, labels, ticks (major only)
represent text properties.
vtkProperty * LastRadialAxisProperty
General properties of last radial axis.
int RadialAxesVisibility
Visibility of radial axes and their titles.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
int ArcTickVisibility
Enable / Disable major/minor tick visibility on the last arc displayed.
double * GetBounds()
Return a reference to the Prop3D's composite transform.
map vtkPolyData to graphics primitives
int RadialTitleVisibility
Visibility of radial axes and their titles.
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.
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
Support the standard render methods.
double ViewAngleLODThreshold
This determines at what view angle to geometry will make the geometry not visibile.
int DrawRadialGridlines
Visibility of the inner axes (overriden to 0 if RadialAxesVisibility is set to 0) ...
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
int AxisTickVisibility
Hold visibility of major/minor ticks for the polar axis and the last radial axis. ...
int PolarTitleVisibility
Visibility of polar axis and its title, labels, ticks (major only)
double LabelScale
Label scale factor.
int EnableViewAngleLOD
If enabled the actor will not be visible at a certain view angle.
void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this actor.
double DeltaAngleRadialAxes
Angle between 2 radial Axes.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkTextProperty * LastRadialAxisTextProperty
Text properties of last radial axis.
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.
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
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 -