53 #ifndef vtkAxisActor_h
54 #define vtkAxisActor_h
56 #include "vtkRenderingAnnotationModule.h"
91 { this->SetPoint1(x[0], x[1], x[2]); }
92 virtual void SetPoint1(
double x,
double y,
double z);
93 virtual double *GetPoint1();
102 { this->SetPoint2(x[0], x[1], x[2]); }
103 virtual void SetPoint2(
double x,
double y,
double z);
104 virtual double *GetPoint2();
112 vtkSetVector2Macro(Range,
double);
113 vtkGetVectorMacro(Range,
double, 2);
120 void SetBounds(
const double bounds[6]);
121 void SetBounds(
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
130 vtkSetStringMacro(LabelFormat);
143 vtkGetMacro(UseTextActor3D,
int);
151 vtkGetMacro(MinorTicksVisible,
int);
159 void SetTitle(
const char *t);
167 void SetExponent(
const char *t);
176 vtkGetMacro(MajorTickSize,
double);
184 vtkGetMacro(MinorTickSize,
double);
189 VTK_TICKS_INSIDE = 0,
190 VTK_TICKS_OUTSIDE = 1,
200 vtkSetClampMacro(TickLocation,
int, VTK_TICKS_INSIDE, VTK_TICKS_BOTH);
201 vtkGetMacro(TickLocation,
int);
205 { this->SetTickLocation(VTK_TICKS_INSIDE); };
207 { this->SetTickLocation(VTK_TICKS_OUTSIDE); };
209 { this->SetTickLocation(VTK_TICKS_BOTH); };
216 vtkGetMacro(AxisVisibility,
int);
225 vtkGetMacro(TickVisibility,
int);
234 vtkGetMacro(LabelVisibility,
int);
243 vtkGetMacro(TitleVisibility,
int);
252 vtkGetMacro(ExponentVisibility,
bool);
259 VTK_ALIGN_BOTTOM = 1,
260 VTK_ALIGN_POINT1 = 2,
269 vtkSetClampMacro(TitleAlignLocation,
int, VTK_ALIGN_TOP, VTK_ALIGN_POINT2);
270 vtkGetMacro(TitleAlignLocation,
int);
278 vtkSetClampMacro(ExponentLocation,
int, VTK_ALIGN_TOP, VTK_ALIGN_POINT2);
279 vtkGetMacro(ExponentLocation,
int);
359 vtkGetMacro(DrawGridlines,
int);
370 vtkGetMacro(DrawGridlinesOnly,
int);
375 vtkGetMacro(DrawGridlinesLocation,
int);
382 vtkGetMacro(DrawInnerGridlines,
int);
391 vtkGetMacro(GridlineXLength,
double);
393 vtkGetMacro(GridlineYLength,
double);
395 vtkGetMacro(GridlineZLength,
double);
403 vtkGetMacro(DrawGridpolys,
int);
418 vtkSetClampMacro(AxisType,
int, VTK_AXIS_TYPE_X, VTK_AXIS_TYPE_Z);
419 vtkGetMacro(AxisType,
int);
427 VTK_AXIS_POS_MINMIN = 0,
428 VTK_AXIS_POS_MINMAX = 1,
429 VTK_AXIS_POS_MAXMAX = 2,
430 VTK_AXIS_POS_MAXMIN = 3
438 vtkGetMacro(Log,
bool);
450 vtkSetClampMacro(AxisPosition,
int, VTK_AXIS_POS_MINMIN, VTK_AXIS_POS_MAXMIN);
451 vtkGetMacro(AxisPosition,
int);
455 { this->SetAxisPosition(VTK_AXIS_POS_MINMIN); };
457 { this->SetAxisPosition(VTK_AXIS_POS_MINMAX); };
459 { this->SetAxisPosition(VTK_AXIS_POS_MAXMAX); };
461 { this->SetAxisPosition(VTK_AXIS_POS_MAXMIN); };
477 virtual int RenderTranslucentGeometry(
vtkViewport* viewport);
490 double ComputeMaxLabelLength(
const double [3]);
491 double ComputeTitleLength(
const double [3]);
493 void SetLabelScale(
const double scale);
494 void SetLabelScale(
int labelIndex,
const double scale);
495 void SetTitleScale(
const double scale);
503 vtkGetMacro(MinorStart,
double);
504 double GetMajorStart(
int axis);
505 void SetMajorStart(
int axis,
double value);
509 vtkGetMacro(DeltaMinor,
double);
510 double GetDeltaMajor(
int axis);
511 void SetDeltaMajor(
int axis,
double value);
524 vtkGetMacro(MinorRangeStart,
double);
526 vtkGetMacro(MajorRangeStart,
double);
528 vtkGetMacro(DeltaRangeMinor,
double);
530 vtkGetMacro(DeltaRangeMajor,
double);
557 return this->LabelActors;
573 return this->LabelProps3D;
589 vtkGetMacro(NumberOfLabelsBuilt,
int);
598 vtkGetMacro(CalculateTitleOffset,
int);
608 vtkGetMacro(CalculateLabelOffset,
int);
617 vtkGetMacro(Use2DMode,
int);
625 vtkGetMacro(VerticalOffsetXTitle2D,
double);
633 vtkGetMacro(HorizontalOffsetYTitle2D,
double);
641 vtkGetMacro(SaveTitlePosition,
int);
648 vtkSetVector3Macro(AxisBaseForX,
double);
649 vtkGetVector3Macro(AxisBaseForX,
double);
656 vtkSetVector3Macro(AxisBaseForY,
double);
657 vtkGetVector3Macro(AxisBaseForY,
double);
664 vtkSetVector3Macro(AxisBaseForZ,
double);
665 vtkGetVector3Macro(AxisBaseForZ,
double);
673 vtkGetMacro(AxisOnOrigin,
int);
681 vtkGetMacro(LabelOffset,
double);
683 vtkGetMacro(TitleOffset,
double);
685 vtkGetMacro(ExponentOffset,
double);
687 vtkGetMacro(ScreenSize,
double);
751 double AxisBaseForX[3];
752 double AxisBaseForY[3];
753 double AxisBaseForZ[3];
757 void operator=(
const vtkAxisActor&) VTK_DELETE_FUNCTION;
759 void TransformBounds(
vtkViewport *,
double bnds[6]);
769 void RotateActor2DFromAxisProjection(
vtkTextActor* pActor2D);
786 void BuildTitle(
bool);
791 void BuildExponent(
bool force);
793 void BuildExponent2D(
vtkViewport *viewport,
bool force);
797 void SetAxisPointsAndLines(
void);
799 bool BuildTickPoints(
double p1[3],
double p2[3],
bool force);
802 void BuildMajorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
805 void BuildMajorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
808 void BuildMinorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
811 void BuildMinorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
813 void BuildAxisGridLines(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
815 bool TickVisibilityChanged(
void);
820 bool BoundsDisplayCoordinateChanged(
vtkViewport *viewport);
825 double MajorTickSize;
826 double MinorTickSize;
829 double MajorStart[3];
830 double DeltaMajor[3];
835 double MajorRangeStart;
836 double MinorRangeStart;
841 double DeltaRangeMinor;
846 double DeltaRangeMajor;
848 int LastAxisPosition;
850 int LastTickLocation;
851 double LastLabelStart;
895 vtkActor *AxisMajorTicksActor, *AxisMinorTicksActor;
917 int AxisHasZeroLength;
919 int CalculateTitleOffset;
920 int CalculateLabelOffset;
931 double VerticalOffsetXTitle2D;
937 double HorizontalOffsetYTitle2D;
945 int SaveTitlePosition;
950 double TitleConstantPosition[2];
957 double LastMinDisplayCoordinate[3];
958 double LastMaxDisplayCoordinate[3];
959 double TickVector[3];
968 double ExponentOffset;