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" 85 virtual void SetPole(
double[3]);
86 virtual void SetPole(
double,
double,
double);
87 vtkGetVector3Macro(Pole,
double);
96 vtkGetMacro(Log,
bool);
105 vtkGetMacro(RequestedNumberOfRadialAxes,
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);
373 vtkGetMacro(ArcTicksOriginToPolarAxis,
int);
385 vtkGetMacro(RadialAxesOriginToPolarAxis,
int);
394 vtkGetMacro(PolarTickVisibility,
int);
403 vtkGetMacro(AxisTickVisibility,
int);
412 vtkGetMacro(AxisMinorTickVisibility,
int);
421 vtkGetMacro(ArcTickVisibility,
int);
430 vtkGetMacro(ArcMinorTickVisibility,
int);
439 vtkGetMacro(ArcMajorTickSize,
double);
447 vtkGetMacro(PolarAxisMajorTickSize,
double);
455 vtkGetMacro(LastRadialAxisMajorTickSize,
double);
463 vtkGetMacro(PolarAxisTickRatioSize,
double);
471 vtkGetMacro(LastAxisTickRatioSize,
double);
479 vtkGetMacro(ArcTickRatioSize,
double);
487 vtkGetMacro(PolarAxisMajorTickThickness,
double);
494 vtkSetMacro(LastRadialAxisMajorTickThickness,
double);
495 vtkGetMacro(LastRadialAxisMajorTickThickness,
double);
503 vtkGetMacro(ArcMajorTickThickness,
double);
511 vtkGetMacro(PolarAxisTickRatioThickness,
double);
519 vtkGetMacro(LastAxisTickRatioThickness,
double);
527 vtkGetMacro(ArcTickRatioThickness,
double);
535 vtkGetMacro(DeltaRangeMajor,
double);
543 vtkGetMacro(DeltaRangeMinor,
double);
551 vtkGetMacro(DeltaAngleMajor,
double);
559 vtkGetMacro(DeltaAngleMinor,
double);
567 vtkGetMacro(DeltaAngleRadialAxes,
double);
577 vtkGetMacro(RadialAxesVisibility,
int);
586 vtkGetMacro(RadialTitleVisibility,
int);
595 vtkGetMacro(PolarArcsVisibility,
int);
603 void SetUse2DMode(
int val);
651 virtual void SetLastRadialAxisProperty(
vtkProperty* p);
652 vtkGetObjectMacro(LastRadialAxisProperty,
vtkProperty);
659 virtual void SetSecondaryRadialAxesProperty(
vtkProperty* p);
660 vtkGetObjectMacro(SecondaryRadialAxesProperty,
vtkProperty);
675 virtual void SetSecondaryPolarArcsProperty(
vtkProperty* p);
686 vtkSetVector6Macro(Bounds,
double);
689 double& xmin,
double& xmax,
double& ymin,
double& ymax,
double& zmin,
double& zmax);
690 void GetBounds(
double bounds[6]);
697 vtkSetClampMacro(Ratio,
double, 0.001, 100.0);
698 vtkGetMacro(Ratio,
double);
703 ~vtkPolarAxesActor() VTK_OVERRIDE;
708 bool CheckMembersConsistency();
719 void CalculateBounds();
729 void SetPolarAxisAttributes(vtkAxisActor*);
734 void CreateRadialAxes(
int axisCount);
739 void BuildRadialAxes();
747 void AutoComputeTicksProperties();
752 double ComputeIdealStep(
int subDivsRequired,
double rangeLength,
int maxSubDivs = 1000);
757 void BuildArcTicks();
763 void StoreTicksPtsFromParamEllipse(
764 double a,
double angleEllipseRad,
double tickSize,
vtkPoints* tickPts);
769 void BuildPolarAxisLabelsArcs();
774 void BuildPolarAxisLabelsArcsLog();
779 void BuildLabelsLog();
781 void BuildPolarArcsLog();
786 std::
string FindExponentAndAdjustValues(std::list<
double>& valuesList);
791 void GetSignificantPartFromValues(
vtkStringArray* valuesStr, std::list<
double>& valuesList);
798 double FSign(
double,
double);
805 void AutoScale(vtkViewport* viewport);
811 static
double ComputeEllipseAngle(
double angleInDegrees,
double ratio);
816 virtual
void ComputeDeltaAngleRadialAxes(
vtkIdType);
826 int NumberOfRadialAxes;
831 int RequestedNumberOfRadialAxes;
837 bool AutoSubdividePolarAxis;
852 double DeltaRangeMinor;
857 double DeltaRangeMajor;
862 double DeltaAngleMinor;
867 double DeltaAngleMajor;
872 double DeltaAngleRadialAxes;
878 double MinimumRadius;
884 double MaximumRadius;
895 bool AutoScaleRadius;
912 double SmallestVisiblePolarAngle;
941 vtkAxisActor* PolarAxis;
946 vtkAxisActor** RadialAxes;
953 char* PolarAxisTitle;
954 char* PolarLabelFormat;
960 char* RadialAngleFormat;
972 int EnableDistanceLOD;
978 double DistanceLODThreshold;
984 int EnableViewAngleLOD;
990 double ViewAngleLODThreshold;
996 int PolarAxisVisibility;
997 int PolarTitleVisibility;
998 int PolarLabelVisibility;
1013 int PolarTickVisibility;
1021 int ArcTicksOriginToPolarAxis;
1029 int RadialAxesOriginToPolarAxis;
1034 int AxisTickVisibility, AxisMinorTickVisibility;
1039 int ArcTickVisibility, ArcMinorTickVisibility;
1044 double PolarAxisMajorTickSize, LastRadialAxisMajorTickSize, ArcMajorTickSize;
1049 double PolarAxisTickRatioSize, LastAxisTickRatioSize, ArcTickRatioSize;
1054 double PolarAxisMajorTickThickness, LastRadialAxisMajorTickThickness, ArcMajorTickThickness;
1059 double PolarAxisTickRatioThickness, LastAxisTickRatioThickness, ArcTickRatioThickness;
1065 int RadialAxesVisibility;
1066 int RadialTitleVisibility;
1072 int RadialAxisTitleLocation;
1077 int PolarAxisTitleLocation;
1088 int PolarArcsVisibility;
1093 int DrawRadialGridlines;
1098 int DrawPolarArcsGridlines;
1174 vtkPolarAxesActor(const vtkPolarAxesActor&) VTK_DELETE_FUNCTION;
1175 void operator=(const vtkPolarAxesActor&) VTK_DELETE_FUNCTION;
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 -