33 #ifndef vtkPolarAxesActor_h 34 #define vtkPolarAxesActor_h 36 #define VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES 50 37 #define VTK_DEFAULT_NUMBER_OF_RADIAL_AXES 5 38 #define VTK_MAXIMUM_NUMBER_OF_POLAR_AXIS_TICKS 200 39 #define VTK_MAXIMUM_RATIO 1000.0 40 #define VTK_POLAR_ARC_RESOLUTION_PER_DEG 0.2 44 #include "vtkRenderingAnnotationModule.h" 79 virtual void SetPole(
double[3]);
80 virtual void SetPole(
double,
double,
double);
81 vtkGetVector3Macro(Pole,
double);
90 vtkGetMacro(Log,
bool);
99 vtkGetMacro(RequestedNumberOfRadialAxes,
vtkIdType);
107 virtual void SetNumberOfPolarAxisTicks(
int);
108 int GetNumberOfPolarAxisTicks();
117 vtkGetMacro(AutoSubdividePolarAxis,
bool);
125 vtkSetVector2Macro(Range,
double);
126 vtkGetVectorMacro(Range,
double, 2);
133 virtual void SetMinimumRadius(
double);
134 vtkGetMacro(MinimumRadius,
double);
141 virtual void SetMaximumRadius(
double);
142 vtkGetMacro(MaximumRadius,
double);
149 virtual void SetMinimumAngle(
double);
150 vtkGetMacro(MinimumAngle,
double);
157 virtual void SetMaximumAngle(
double);
158 vtkGetMacro(MaximumAngle,
double);
167 vtkSetClampMacro(SmallestVisiblePolarAngle,
double, 0., 5.);
168 vtkGetMacro(SmallestVisiblePolarAngle,
double);
178 vtkGetMacro(TickLocation,
int);
186 vtkGetMacro(RadialUnits,
bool);
197 vtkGetMacro(ScreenSize,
double);
214 vtkSetStringMacro(PolarAxisTitle);
222 vtkSetStringMacro(PolarLabelFormat);
228 VTK_EXPONENT_BOTTOM = 0,
229 VTK_EXPONENT_EXTERN = 1,
230 VTK_EXPONENT_LABELS = 2
239 vtkSetClampMacro(ExponentLocation,
int, VTK_EXPONENT_BOTTOM, VTK_EXPONENT_LABELS);
240 vtkGetMacro(ExponentLocation,
int);
247 vtkSetStringMacro(RadialAngleFormat);
263 vtkGetMacro(EnableDistanceLOD,
int);
270 vtkSetClampMacro(DistanceLODThreshold,
double, 0.0, 1.0);
271 vtkGetMacro(DistanceLODThreshold,
double);
279 vtkGetMacro(EnableViewAngleLOD,
int);
286 vtkSetClampMacro(ViewAngleLODThreshold,
double, 0., 1.);
287 vtkGetMacro(ViewAngleLODThreshold,
double);
295 vtkGetMacro(PolarAxisVisibility,
int);
304 vtkGetMacro(DrawRadialGridlines,
int);
313 vtkGetMacro(DrawPolarArcsGridlines,
int);
322 vtkGetMacro(PolarTitleVisibility,
int);
328 VTK_TITLE_BOTTOM = 0,
337 vtkSetClampMacro(RadialAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
338 vtkGetMacro(RadialAxisTitleLocation,
int);
346 vtkSetClampMacro(PolarAxisTitleLocation,
int, VTK_TITLE_BOTTOM, VTK_TITLE_EXTERN);
347 vtkGetMacro(PolarAxisTitleLocation,
int);
355 vtkGetMacro(PolarLabelVisibility,
int);
367 vtkGetMacro(ArcTicksOriginToPolarAxis,
int);
379 vtkGetMacro(RadialAxesOriginToPolarAxis,
int);
388 vtkGetMacro(PolarTickVisibility,
int);
397 vtkGetMacro(AxisTickVisibility,
int);
406 vtkGetMacro(AxisMinorTickVisibility,
int);
415 vtkGetMacro(ArcTickVisibility,
int);
424 vtkGetMacro(ArcMinorTickVisibility,
int);
433 vtkGetMacro(ArcMajorTickSize,
double);
441 vtkGetMacro(PolarAxisMajorTickSize,
double);
449 vtkGetMacro(LastRadialAxisMajorTickSize,
double);
457 vtkGetMacro(PolarAxisTickRatioSize,
double);
465 vtkGetMacro(LastAxisTickRatioSize,
double);
473 vtkGetMacro(ArcTickRatioSize,
double);
481 vtkGetMacro(PolarAxisMajorTickThickness,
double);
488 vtkSetMacro(LastRadialAxisMajorTickThickness,
double);
489 vtkGetMacro(LastRadialAxisMajorTickThickness,
double);
497 vtkGetMacro(ArcMajorTickThickness,
double);
505 vtkGetMacro(PolarAxisTickRatioThickness,
double);
513 vtkGetMacro(LastAxisTickRatioThickness,
double);
521 vtkGetMacro(ArcTickRatioThickness,
double);
529 vtkGetMacro(DeltaRangeMajor,
double);
537 vtkGetMacro(DeltaRangeMinor,
double);
545 vtkGetMacro(DeltaAngleMajor,
double);
553 vtkGetMacro(DeltaAngleMinor,
double);
561 vtkGetMacro(DeltaAngleRadialAxes,
double);
571 vtkGetMacro(RadialAxesVisibility,
int);
580 vtkGetMacro(RadialTitleVisibility,
int);
589 vtkGetMacro(PolarArcsVisibility,
int);
597 void SetUse2DMode(
int val);
645 virtual void SetLastRadialAxisProperty(
vtkProperty* p);
646 vtkGetObjectMacro(LastRadialAxisProperty,
vtkProperty);
653 virtual void SetSecondaryRadialAxesProperty(
vtkProperty* p);
654 vtkGetObjectMacro(SecondaryRadialAxesProperty,
vtkProperty);
669 virtual void SetSecondaryPolarArcsProperty(
vtkProperty* p);
680 vtkSetVector6Macro(Bounds,
double);
683 double& xmin,
double& xmax,
double& ymin,
double& ymax,
double& zmin,
double& zmax);
684 void GetBounds(
double bounds[6]);
691 vtkSetClampMacro(Ratio,
double, 0.001, 100.0);
692 vtkGetMacro(Ratio,
double);
702 bool CheckMembersConsistency();
713 void CalculateBounds();
728 void CreateRadialAxes(
int axisCount);
733 void BuildRadialAxes();
741 void AutoComputeTicksProperties();
746 double ComputeIdealStep(
int subDivsRequired,
double rangeLength,
int maxSubDivs = 1000);
751 void BuildArcTicks();
757 void StoreTicksPtsFromParamEllipse(
758 double a,
double angleEllipseRad,
double tickSize,
vtkPoints* tickPts);
763 void BuildPolarAxisLabelsArcs();
768 void BuildPolarAxisLabelsArcsLog();
773 void BuildLabelsLog();
775 void BuildPolarArcsLog();
780 std::
string FindExponentAndAdjustValues(std::list<
double>& valuesList);
785 void GetSignificantPartFromValues(
vtkStringArray* valuesStr, std::list<
double>& valuesList);
792 double FSign(
double,
double);
805 static
double ComputeEllipseAngle(
double angleInDegrees,
double ratio);
810 virtual
void ComputeDeltaAngleRadialAxes(
vtkIdType);
820 int NumberOfRadialAxes;
825 int RequestedNumberOfRadialAxes;
831 bool AutoSubdividePolarAxis;
846 double DeltaRangeMinor;
851 double DeltaRangeMajor;
856 double DeltaAngleMinor;
861 double DeltaAngleMajor;
866 double DeltaAngleRadialAxes;
872 double MinimumRadius;
878 double MaximumRadius;
889 bool AutoScaleRadius;
906 double SmallestVisiblePolarAngle;
947 char* PolarAxisTitle;
948 char* PolarLabelFormat;
954 char* RadialAngleFormat;
966 int EnableDistanceLOD;
972 double DistanceLODThreshold;
978 int EnableViewAngleLOD;
984 double ViewAngleLODThreshold;
990 int PolarAxisVisibility;
991 int PolarTitleVisibility;
992 int PolarLabelVisibility;
1007 int PolarTickVisibility;
1015 int ArcTicksOriginToPolarAxis;
1023 int RadialAxesOriginToPolarAxis;
1028 int AxisTickVisibility, AxisMinorTickVisibility;
1033 int ArcTickVisibility, ArcMinorTickVisibility;
1038 double PolarAxisMajorTickSize, LastRadialAxisMajorTickSize, ArcMajorTickSize;
1043 double PolarAxisTickRatioSize, LastAxisTickRatioSize, ArcTickRatioSize;
1048 double PolarAxisMajorTickThickness, LastRadialAxisMajorTickThickness, ArcMajorTickThickness;
1053 double PolarAxisTickRatioThickness, LastAxisTickRatioThickness, ArcTickRatioThickness;
1059 int RadialAxesVisibility;
1060 int RadialTitleVisibility;
1066 int RadialAxisTitleLocation;
1071 int PolarAxisTitleLocation;
1082 int PolarArcsVisibility;
1087 int DrawRadialGridlines;
1092 int DrawPolarArcsGridlines;
represents an object (geometry & properties) in a rendered scene
abstract specification for Viewports
represent surface properties of a geometric object
virtual int RenderOverlay(vtkViewport *)
record modification and/or execution time
Create an axis with tick marks and labels.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a vtkAbstractArray subclass for strings
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).
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
window superclass for vtkRenderWindow
a simple class to control print indentation
a virtual camera for 3D rendering
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
represent text properties.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
map vtkPolyData to graphics primitives
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the polar axes.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
represent and manipulate 3D points
#define VTK_MAXIMUM_NUMBER_OF_RADIAL_AXES
create an actor of a polar axes -