VTK  9.3.20240424
vtkAxisActor.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
63#ifndef vtkAxisActor_h
64#define vtkAxisActor_h
65
66#include "vtkActor.h"
67#include "vtkDeprecation.h" // For deprecation macro
68#include "vtkNew.h" // For vtkNew
69#include "vtkRenderingAnnotationModule.h" // For export macro
70#include "vtkSmartPointer.h" // For vtkSmartPointer
71#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
72
73VTK_ABI_NAMESPACE_BEGIN
74class vtkAxisFollower;
75class vtkCamera;
76class vtkCoordinate;
77class vtkFollower;
78class vtkPoints;
79class vtkPolyData;
82class vtkProperty2D;
83class vtkStringArray;
84class vtkTextActor;
85class vtkTextActor3D;
86class vtkTextProperty;
87class vtkVectorText;
88
89class VTKRENDERINGANNOTATION_EXPORT VTK_MARSHALAUTO vtkAxisActor : public vtkActor
90{
91public:
92 vtkTypeMacro(vtkAxisActor, vtkActor);
93 void PrintSelf(ostream& os, vtkIndent indent) override;
94
98 static vtkAxisActor* New();
99
101
105 virtual void SetPoint1(double x[3]) { this->SetPoint1(x[0], x[1], x[2]); }
106 virtual void SetPoint1(double x, double y, double z);
107 virtual double* GetPoint1();
109
111
115 virtual void SetPoint2(double x[3]) { this->SetPoint2(x[0], x[1], x[2]); }
116 virtual void SetPoint2(double x, double y, double z);
117 virtual double* GetPoint2();
119
121
126 vtkSetVector2Macro(Range, double);
127 vtkGetVectorMacro(Range, double, 2);
129
131
135 void SetBounds(const double bounds[6]);
136 void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
137 double* GetBounds() VTK_SIZEHINT(6) override;
138 void GetBounds(double bounds[6]);
140
142
145 vtkSetStringMacro(LabelFormat);
146 vtkGetStringMacro(LabelFormat);
148
150
157 vtkSetMacro(UseTextActor3D, bool);
158 vtkGetMacro(UseTextActor3D, bool);
160
162
166 vtkSetMacro(MinorTicksVisible, bool);
167 vtkGetMacro(MinorTicksVisible, bool);
168 vtkBooleanMacro(MinorTicksVisible, bool);
170
172
175 void SetTitle(const char* t);
176 vtkGetStringMacro(Title);
178
180
183 void SetExponent(const char* t);
184 vtkGetStringMacro(Exponent);
186
188
192 vtkSetMacro(MajorTickSize, double);
193 vtkGetMacro(MajorTickSize, double);
195
197
201 vtkSetMacro(MinorTickSize, double);
202 vtkGetMacro(MinorTickSize, double);
204
206 {
207 VTK_TICKS_INSIDE = 0,
208 VTK_TICKS_OUTSIDE = 1,
209 VTK_TICKS_BOTH = 2
210 };
211
213
219 vtkSetClampMacro(TickLocation, int, VTK_TICKS_INSIDE, VTK_TICKS_BOTH);
220 vtkGetMacro(TickLocation, int);
222
223 void SetTickLocationToInside() { this->SetTickLocation(VTK_TICKS_INSIDE); }
224 void SetTickLocationToOutside() { this->SetTickLocation(VTK_TICKS_OUTSIDE); }
225 void SetTickLocationToBoth() { this->SetTickLocation(VTK_TICKS_BOTH); }
226
228
232 vtkSetMacro(AxisVisibility, bool);
233 vtkGetMacro(AxisVisibility, bool);
234 vtkBooleanMacro(AxisVisibility, bool);
236
238
242 vtkSetMacro(TickVisibility, bool);
243 vtkGetMacro(TickVisibility, bool);
244 vtkBooleanMacro(TickVisibility, bool);
246
248
252 vtkSetMacro(LabelVisibility, bool);
253 vtkGetMacro(LabelVisibility, bool);
254 vtkBooleanMacro(LabelVisibility, bool);
256
258
262 vtkSetMacro(TitleVisibility, bool);
263 vtkGetMacro(TitleVisibility, bool);
264 vtkBooleanMacro(TitleVisibility, bool);
266
268
272 vtkSetMacro(ExponentVisibility, bool);
273 vtkGetMacro(ExponentVisibility, bool);
274 vtkBooleanMacro(ExponentVisibility, bool);
276
278
282 vtkSetMacro(LastMajorTickPointCorrection, bool);
283 vtkGetMacro(LastMajorTickPointCorrection, bool);
284 vtkBooleanMacro(LastMajorTickPointCorrection, bool);
286
288 {
289 VTK_ALIGN_TOP = 0,
290 VTK_ALIGN_BOTTOM = 1,
291 VTK_ALIGN_POINT1 = 2,
292 VTK_ALIGN_POINT2 = 3
293 };
294
296
301 virtual void SetTitleAlignLocation(int location);
302 vtkGetMacro(TitleAlignLocation, int);
304
306
311 virtual void SetExponentLocation(int location);
312 vtkGetMacro(ExponentLocation, int);
314
316
322
324
330
332
338
340
346
348
354
356
362
364
370
372
378
380
386
388
392 vtkSetMacro(DrawGridlines, bool);
393 vtkGetMacro(DrawGridlines, bool);
394 vtkBooleanMacro(DrawGridlines, bool);
396
398
404 vtkSetMacro(DrawGridlinesOnly, bool);
405 vtkGetMacro(DrawGridlinesOnly, bool);
406 vtkBooleanMacro(DrawGridlinesOnly, bool);
408
409 vtkSetMacro(DrawGridlinesLocation, int);
410 vtkGetMacro(DrawGridlinesLocation, int);
411
413
417 vtkSetMacro(DrawInnerGridlines, bool);
418 vtkGetMacro(DrawInnerGridlines, bool);
419 vtkBooleanMacro(DrawInnerGridlines, bool);
421
423
427 vtkSetMacro(GridlineXLength, double);
428 vtkGetMacro(GridlineXLength, double);
429 vtkSetMacro(GridlineYLength, double);
430 vtkGetMacro(GridlineYLength, double);
431 vtkSetMacro(GridlineZLength, double);
432 vtkGetMacro(GridlineZLength, double);
434
436
440 vtkSetMacro(DrawGridpolys, bool);
441 vtkGetMacro(DrawGridpolys, bool);
442 vtkBooleanMacro(DrawGridpolys, bool);
444
446 {
447 VTK_AXIS_TYPE_X = 0,
448 VTK_AXIS_TYPE_Y = 1,
449 VTK_AXIS_TYPE_Z = 2
450 };
451
453
457 vtkSetClampMacro(AxisType, int, VTK_AXIS_TYPE_X, VTK_AXIS_TYPE_Z);
458 vtkGetMacro(AxisType, int);
459 void SetAxisTypeToX() { this->SetAxisType(VTK_AXIS_TYPE_X); }
460 void SetAxisTypeToY() { this->SetAxisType(VTK_AXIS_TYPE_Y); }
461 void SetAxisTypeToZ() { this->SetAxisType(VTK_AXIS_TYPE_Z); }
463
465 {
466 VTK_AXIS_POS_MINMIN = 0,
467 VTK_AXIS_POS_MINMAX = 1,
468 VTK_AXIS_POS_MAXMAX = 2,
469 VTK_AXIS_POS_MAXMIN = 3
470 };
471
473
477 vtkSetMacro(Log, bool);
478 vtkGetMacro(Log, bool);
479 vtkBooleanMacro(Log, bool);
481
483
491 vtkSetClampMacro(AxisPosition, int, VTK_AXIS_POS_MINMIN, VTK_AXIS_POS_MAXMIN);
492 vtkGetMacro(AxisPosition, int);
494
495 void SetAxisPositionToMinMin() { this->SetAxisPosition(VTK_AXIS_POS_MINMIN); }
496 void SetAxisPositionToMinMax() { this->SetAxisPosition(VTK_AXIS_POS_MINMAX); }
497 void SetAxisPositionToMaxMax() { this->SetAxisPosition(VTK_AXIS_POS_MAXMAX); }
498 void SetAxisPositionToMaxMin() { this->SetAxisPosition(VTK_AXIS_POS_MAXMIN); }
499
501
505 virtual void SetCamera(vtkCamera*);
508
510
513 int RenderOpaqueGeometry(vtkViewport* viewport) override;
516 int RenderOverlay(vtkViewport* viewport) override;
519
526
527 double ComputeMaxLabelLength(const double[3]);
528 double ComputeTitleLength(const double[3]);
529
530 void SetLabelScale(double scale);
531 void SetLabelScale(int labelIndex, double scale);
532 void SetTitleScale(double scale);
533
535
539 vtkSetMacro(MinorStart, double);
540 vtkGetMacro(MinorStart, double);
541 double GetMajorStart(int axis);
542 void SetMajorStart(int axis, double value);
543 vtkSetMacro(DeltaMinor, double);
544 vtkGetMacro(DeltaMinor, double);
545 double GetDeltaMajor(int axis);
546 void SetDeltaMajor(int axis, double value);
548
550
556 vtkSetMacro(MinorRangeStart, double);
557 vtkGetMacro(MinorRangeStart, double);
558 vtkSetMacro(MajorRangeStart, double);
559 vtkGetMacro(MajorRangeStart, double);
561
563
567 vtkSetMacro(DeltaRangeMinor, double);
568 vtkGetMacro(DeltaRangeMinor, double);
569 vtkSetMacro(DeltaRangeMajor, double);
570 vtkGetMacro(DeltaRangeMajor, double);
572
574
575 void BuildAxis(vtkViewport* viewport, bool);
576
578
582 vtkGetObjectMacro(TitleActor, vtkAxisFollower);
584
586
589 vtkGetObjectMacro(ExponentActor, vtkAxisFollower);
591
595 inline vtkAxisFollower** GetLabelActors() { return this->LabelActors; }
596
598
602 vtkGetObjectMacro(TitleProp3D, vtkProp3DAxisFollower);
604
608 inline vtkProp3DAxisFollower** GetLabelProps3D() { return this->LabelProps3D; }
609
611
615 vtkGetObjectMacro(ExponentProp3D, vtkProp3DAxisFollower);
617
619
623 vtkGetMacro(NumberOfLabelsBuilt, int);
625
627
631 vtkSetMacro(CalculateTitleOffset, bool);
632 vtkGetMacro(CalculateTitleOffset, bool);
633 vtkBooleanMacro(CalculateTitleOffset, bool);
635
637
641 vtkSetMacro(CalculateLabelOffset, bool);
642 vtkGetMacro(CalculateLabelOffset, bool);
643 vtkBooleanMacro(CalculateLabelOffset, bool);
645
647
651 vtkSetMacro(Use2DMode, bool);
652 vtkGetMacro(Use2DMode, bool);
654
656
660 vtkSetMacro(VerticalOffsetXTitle2D, double);
661 vtkGetMacro(VerticalOffsetXTitle2D, double);
663
665
669 vtkSetMacro(HorizontalOffsetYTitle2D, double);
670 vtkGetMacro(HorizontalOffsetYTitle2D, double);
672
674
678 vtkSetMacro(SaveTitlePosition, int);
679 vtkGetMacro(SaveTitlePosition, int);
681
683
687 vtkSetVector3Macro(AxisBaseForX, double);
688 vtkGetVector3Macro(AxisBaseForX, double);
690
692
696 vtkSetVector3Macro(AxisBaseForY, double);
697 vtkGetVector3Macro(AxisBaseForY, double);
699
701
705 vtkSetVector3Macro(AxisBaseForZ, double);
706 vtkGetVector3Macro(AxisBaseForZ, double);
708
710
714 vtkSetMacro(AxisOnOrigin, bool);
715 vtkGetMacro(AxisOnOrigin, bool);
717
719
723 vtkSetMacro(ScreenSize, double);
724 vtkGetMacro(ScreenSize, double);
726
728
732 vtkSetMacro(LabelOffset, double);
733 vtkGetMacro(LabelOffset, double);
735
737
741 vtkSetMacro(ExponentOffset, double);
742 vtkGetMacro(ExponentOffset, double);
744
746
753 VTK_DEPRECATED_IN_9_3_0("Use SetTitleOffset(double, double) as it's now a 2d vector")
754 void SetTitleOffset(double titleOffsetY);
755 VTK_DEPRECATED_IN_9_3_0("Use GetTitleOffset(double&, double&) as it's now a 2d vector")
756 double GetTitleOffset();
757 vtkSetVector2Macro(TitleOffset, double);
758 // TODO: Replace getter with macro once deprecated one is removed
759 void GetTitleOffset(double& titleOffsetX, double& titleOffsetY);
761
762protected:
764 ~vtkAxisActor() override;
765
766 char* Title = nullptr;
767 char* Exponent = nullptr;
768 char* LabelFormat = nullptr;
769 double Range[2] = { 0.0, 1.0 };
770 double LastRange[2] = { -1.0, -1.0 };
771 bool UseTextActor3D = false;
772 int NumberOfLabelsBuilt = 0;
773 bool MinorTicksVisible = true;
774 bool LastMinorTicksVisible = true;
775
781 int TickLocation = VTK_TICKS_INSIDE;
782
787 int TitleAlignLocation = VTK_ALIGN_BOTTOM;
788
793 int ExponentLocation = VTK_ALIGN_POINT2;
794
795 bool DrawGridlines = false;
796 bool DrawGridlinesOnly = false;
797 bool LastDrawGridlines = false;
798 int DrawGridlinesLocation = 0; // 0: all | 1: closest | 2: furthest
799 int LastDrawGridlinesLocation = 0; // 0: all | 1: closest | 2: furthest
800 double GridlineXLength = 1.0;
801 double GridlineYLength = 1.0;
802 double GridlineZLength = 1.0;
803
804 bool DrawInnerGridlines = false;
805 bool LastDrawInnerGridlines = false;
806
807 bool DrawGridpolys = false;
808 bool LastDrawGridpolys = false;
809
810 bool AxisVisibility = true;
811 bool TickVisibility = true;
812 bool LastTickVisibility = true;
813 bool LabelVisibility = true;
814 bool TitleVisibility = true;
815 bool ExponentVisibility = false;
816 bool LastMajorTickPointCorrection = false;
817
818 bool Log = false;
819 int AxisType = VTK_AXIS_TYPE_X;
820 int AxisPosition = VTK_AXIS_POS_MINMIN;
821
822 // coordinate system for axisAxtor, relative to world coordinates
823 double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
824 double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
825 double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
826
827private:
828 vtkAxisActor(const vtkAxisActor&) = delete;
829 void operator=(const vtkAxisActor&) = delete;
830
831 void TransformBounds(vtkViewport*, double bnds[6]);
832
833 void BuildLabels(vtkViewport*, bool);
834 void BuildLabels2D(vtkViewport*, bool);
835 void SetLabelPositions(vtkViewport*, bool);
836 void SetLabelPositions2D(vtkViewport*, bool);
837
842 void RotateActor2DFromAxisProjection(vtkTextActor* pActor2D);
843
847 void InitTitle();
848
852 void InitExponent();
853
860 void BuildTitle(bool);
861
866 void BuildExponent(bool force);
867
868 void BuildExponent2D(vtkViewport* viewport, bool force);
869
870 void BuildTitle2D(vtkViewport* viewport, bool);
871
872 void SetAxisPointsAndLines();
873
874 bool BuildTickPoints(double p1[3], double p2[3], bool force);
875
876 // Build major ticks for linear scale.
877 void BuildMajorTicks(double p1[3], double p2[3], double localCoordSys[3][3]);
878
879 // Build major ticks for logarithmic scale.
880 void BuildMajorTicksLog(double p1[3], double p2[3], double localCoordSys[3][3]);
881
882 // Build minor ticks for linear scale.
883 void BuildMinorTicks(double p1[3], double p2[3], double localCoordSys[3][3]);
884
885 // Build minor ticks for logarithmic scale enabled
886 void BuildMinorTicksLog(double p1[3], double p2[3], double localCoordSys[3][3]);
887
888 void BuildAxisGridLines(double p1[3], double p2[3], double localCoordSys[3][3]);
889
890 bool TickVisibilityChanged();
891 vtkProperty* NewTitleProperty();
892 vtkProperty2D* NewTitleProperty2D();
893 vtkProperty* NewLabelProperty();
894
895 bool BoundsDisplayCoordinateChanged(vtkViewport* viewport);
896
897 vtkNew<vtkCoordinate> Point1Coordinate;
898 vtkNew<vtkCoordinate> Point2Coordinate;
899
900 double MajorTickSize = 1.0;
901 double MinorTickSize = 0.5;
902
903 // For each axis (for the inner gridline generation)
904 double MajorStart[3] = { 0.0, 0.0, 0.0 };
905 double DeltaMajor[3] = { 1.0, 1.0, 1.0 };
906 double MinorStart = 0.0;
907 double DeltaMinor = 1.0;
908
909 // For the ticks, w.r.t to the set range
910 double MajorRangeStart = 0.0;
911 double MinorRangeStart = 0.0;
912
916 double DeltaRangeMinor = 1.0;
917
921 double DeltaRangeMajor = 1.0;
922
923 int LastAxisPosition = -1;
924 int LastTickLocation = -1;
925
926 vtkNew<vtkPoints> MinorTickPts;
927 vtkNew<vtkPoints> MajorTickPts;
928 vtkNew<vtkPoints> GridlinePts;
929 vtkNew<vtkPoints> InnerGridlinePts;
930 vtkNew<vtkPoints> GridpolyPts;
931
932 vtkNew<vtkVectorText> TitleVector;
933 vtkNew<vtkPolyDataMapper> TitleMapper;
934 vtkNew<vtkAxisFollower> TitleActor;
935 vtkNew<vtkTextActor> TitleActor2D;
937 vtkNew<vtkTextActor3D> TitleActor3D;
938 vtkSmartPointer<vtkTextProperty> TitleTextProperty;
939
941
944 vtkNew<vtkVectorText> ExponentVector;
945 vtkNew<vtkPolyDataMapper> ExponentMapper;
946 vtkNew<vtkAxisFollower> ExponentActor;
947 vtkNew<vtkTextActor> ExponentActor2D;
948 vtkNew<vtkProp3DAxisFollower> ExponentProp3D;
949 vtkNew<vtkTextActor3D> ExponentActor3D;
951
952 vtkSmartPointer<vtkVectorText>* LabelVectors = nullptr;
953 vtkSmartPointer<vtkPolyDataMapper>* LabelMappers = nullptr;
954 vtkAxisFollower** LabelActors = nullptr;
955 vtkProp3DAxisFollower** LabelProps3D = nullptr;
956 vtkSmartPointer<vtkTextActor>* LabelActors2D = nullptr;
957 vtkSmartPointer<vtkTextActor3D>* LabelActors3D = nullptr;
958 vtkSmartPointer<vtkTextProperty> LabelTextProperty;
959
960 // Main line axis
961 vtkNew<vtkPolyData> AxisLines;
962 vtkNew<vtkPolyDataMapper> AxisLinesMapper;
963 vtkNew<vtkActor> AxisLinesActor;
964
965 // Ticks of the axis
966 vtkNew<vtkPolyData> AxisMajorTicks, AxisMinorTicks;
967 vtkNew<vtkPolyDataMapper> AxisMajorTicksMapper, AxisMinorTicksMapper;
968 vtkNew<vtkActor> AxisMajorTicksActor, AxisMinorTicksActor;
969
970 vtkNew<vtkPolyData> Gridlines;
971 vtkNew<vtkPolyDataMapper> GridlinesMapper;
972 vtkNew<vtkActor> GridlinesActor;
973 vtkNew<vtkPolyData> InnerGridlines;
974 vtkNew<vtkPolyDataMapper> InnerGridlinesMapper;
975 vtkNew<vtkActor> InnerGridlinesActor;
976 vtkNew<vtkPolyData> Gridpolys;
977 vtkNew<vtkPolyDataMapper> GridpolysMapper;
978 vtkNew<vtkActor> GridpolysActor;
979
981 vtkTimeStamp BuildTime;
982 vtkTimeStamp BuildTickPointsTime;
983 vtkTimeStamp BoundsTime;
984 vtkTimeStamp LabelBuildTime;
985 vtkTimeStamp TitleTextTime;
986 vtkTimeStamp ExponentTextTime;
987
988 bool AxisOnOrigin = false;
989
990 bool AxisHasZeroLength = false;
991
992 bool CalculateTitleOffset = false;
993 bool CalculateLabelOffset = false;
994
998 bool Use2DMode = false;
999
1004 double VerticalOffsetXTitle2D = -40;
1005
1010 double HorizontalOffsetYTitle2D = -50;
1011
1018 int SaveTitlePosition = 0;
1019
1023 double TitleConstantPosition[2] = { 0.0, 0.0 };
1024
1028 bool NeedBuild2D = false;
1029
1030 double LastMinDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1031 double LastMaxDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1032 double TickVector[3] = { 0.0, 0.0, 0.0 };
1033
1037 double ScreenSize = 10.0;
1038
1040
1043 double LabelOffset = 30.0;
1044 double TitleOffset[2] = { 20.0, 20.0 };
1045 double ExponentOffset = 20.0;
1047};
1048
1049VTK_ABI_NAMESPACE_END
1050#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
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.
void SetTickLocationToBoth()
void SetAxisPositionToMinMax()
virtual void SetPoint2(double x, double y, double z)
Specify the position of the second point defining the axis.
virtual void SetCamera(vtkCamera *)
Set/Get the camera for this axis.
virtual void SetPoint2(double x[3])
Specify the position of the second point defining the axis.
void SetDeltaMajor(int axis, double value)
Set/Get the starting position for minor and major tick points, and the delta values that determine th...
void SetAxisMainLineProperty(vtkProperty *)
Get/Set main line axis actor property.
virtual double * GetPoint1()
Specify the position of the first point defining the axis.
vtkProperty * GetGridlinesProperty()
Get/Set gridlines actor property (outer grid lines)
void SetBounds(const double bounds[6])
Set or get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
int RenderOverlay(vtkViewport *viewport) override
Draw the axis.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Draw the axis.
double ComputeMaxLabelLength(const double[3])
double GetMajorStart(int axis)
Set/Get the starting position for minor and major tick points, and the delta values that determine th...
void SetGridlinesProperty(vtkProperty *)
Get/Set gridlines actor property (outer grid lines)
void SetAxisTypeToZ()
Set/Get the type of this axis.
vtkProperty * GetGridpolysProperty()
Get/Set gridPolys actor property (grid quads)
virtual void SetLabelTextProperty(vtkTextProperty *p)
Set/Get the axis labels text property.
vtkAxisFollower ** GetLabelActors()
Get label actors responsigle for drawing label text.
virtual void SetExponentLocation(int location)
Get/Set the location of the Detached Exponent related to the axis.
vtkCamera * GetCamera()
Set/Get the camera for this axis.
virtual vtkCoordinate * GetPoint2Coordinate()
Specify the position of the second point defining the axis.
vtkProperty * GetInnerGridlinesProperty()
Get/Set inner gridlines actor property.
void SetAxisPositionToMinMin()
double GetDeltaMajor(int axis)
Set/Get the starting position for minor and major tick points, and the delta values that determine th...
double * GetBounds() override
Set or get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
vtkTextProperty * GetLabelTextProperty()
Set/Get the axis labels text property.
void SetLabelScale(int labelIndex, double scale)
virtual void SetPoint1(double x[3])
Specify the position of the first point defining the axis.
void SetAxisLinesProperty(vtkProperty *)
Get/Set axis actor property (axis and its ticks) (kept for compatibility)
void SetInnerGridlinesProperty(vtkProperty *)
Get/Set inner gridlines actor property.
vtkProperty * GetAxisMajorTicksProperty()
Get/Set axis actor property (axis and its ticks)
void SetAxisMajorTicksProperty(vtkProperty *)
Get/Set axis actor property (axis and its ticks)
void SetLabelScale(double scale)
void SetTickLocationToOutside()
void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
Set or get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
void BuildAxis(vtkViewport *viewport, bool)
virtual double * GetPoint2()
Specify the position of the second point defining the axis.
void SetAxisTypeToY()
Set/Get the type of this axis.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Draw the axis.
void SetAxisTypeToX()
Set/Get the type of this axis.
void SetTitleScale(double scale)
virtual void SetTitleAlignLocation(int location)
Get/Set the alignment of the title related to the axis.
vtkProperty * GetAxisMainLineProperty()
Get/Set main line axis actor property.
virtual void SetTitleTextProperty(vtkTextProperty *p)
Set/Get the axis title text property.
double ComputeTitleLength(const double[3])
void SetAxisPositionToMaxMin()
virtual vtkCoordinate * GetPoint1Coordinate()
Specify the position of the first point defining the axis.
virtual int RenderTranslucentGeometry(vtkViewport *viewport)
Draw the axis.
vtkProp3DAxisFollower ** GetLabelProps3D()
Get label actors responsigle for drawing label text.
void SetTickLocationToInside()
void SetLabels(vtkStringArray *labels)
vtkProperty * GetAxisMinorTicksProperty()
Get/Set axis actor property (axis and its ticks)
vtkTextProperty * GetTitleTextProperty()
Set/Get the axis title text property.
void SetAxisPositionToMaxMax()
virtual void SetPoint1(double x, double y, double z)
Specify the position of the first point defining the axis.
void SetAxisMinorTicksProperty(vtkProperty *)
Get/Set axis actor property (axis and its ticks)
static vtkAxisActor * New()
Instantiate object.
void SetMajorStart(int axis, double value)
Set/Get the starting position for minor and major tick points, and the delta values that determine th...
vtkProperty * GetAxisLinesProperty()
Get/Set axis actor property (axis and its ticks) (kept for compatibility)
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Draw the axis.
void SetGridpolysProperty(vtkProperty *)
Get/Set gridPolys actor property (grid quads)
a subclass of vtkFollower that ensures that data is always parallel to the axis defined by a vtkAxisA...
a virtual camera for 3D rendering
Definition vtkCamera.h:151
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a subclass of actor that always faces the camera
Definition vtkFollower.h:92
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:160
represent and manipulate 3D points
Definition vtkPoints.h:139
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
a subclass of vtkProp3DFollower that ensures that data is always parallel to the axis defined by a vt...
represent surface properties of a 2D image
represent surface properties of a geometric object
Hold a reference to a vtkObjectBase instance.
a vtkAbstractArray subclass for strings
An actor that displays text.
An actor that displays text.
represent text properties.
record modification and/or execution time
create polygonal text
abstract specification for Viewports
Definition vtkViewport.h:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_3_0(reason)
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO