VTK  9.3.0
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
44#ifndef vtkAxisActor_h
45#define vtkAxisActor_h
46
47#include "vtkActor.h"
48#include "vtkDeprecation.h" // For deprecation macro
49#include "vtkNew.h" // For vtkNew
50#include "vtkRenderingAnnotationModule.h" // For export macro
51#include "vtkSmartPointer.h" // For vtkSmartPointer
52
53VTK_ABI_NAMESPACE_BEGIN
54class vtkAxisFollower;
55class vtkCamera;
56class vtkCoordinate;
57class vtkFollower;
58class vtkPoints;
59class vtkPolyData;
62class vtkProperty2D;
63class vtkStringArray;
64class vtkTextActor;
65class vtkTextActor3D;
66class vtkTextProperty;
67class vtkVectorText;
68
69class VTKRENDERINGANNOTATION_EXPORT vtkAxisActor : public vtkActor
70{
71public:
72 vtkTypeMacro(vtkAxisActor, vtkActor);
73 void PrintSelf(ostream& os, vtkIndent indent) override;
74
78 static vtkAxisActor* New();
79
81
85 virtual void SetPoint1(double x[3]) { this->SetPoint1(x[0], x[1], x[2]); }
86 virtual void SetPoint1(double x, double y, double z);
87 virtual double* GetPoint1();
89
91
95 virtual void SetPoint2(double x[3]) { this->SetPoint2(x[0], x[1], x[2]); }
96 virtual void SetPoint2(double x, double y, double z);
97 virtual double* GetPoint2();
99
101
106 vtkSetVector2Macro(Range, double);
107 vtkGetVectorMacro(Range, double, 2);
109
111
115 void SetBounds(const double bounds[6]);
116 void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
117 double* GetBounds() VTK_SIZEHINT(6) override;
118 void GetBounds(double bounds[6]);
120
122
125 vtkSetStringMacro(LabelFormat);
126 vtkGetStringMacro(LabelFormat);
128
130
137 vtkSetMacro(UseTextActor3D, bool);
138 vtkGetMacro(UseTextActor3D, bool);
140
142
146 vtkSetMacro(MinorTicksVisible, bool);
147 vtkGetMacro(MinorTicksVisible, bool);
148 vtkBooleanMacro(MinorTicksVisible, bool);
150
152
155 void SetTitle(const char* t);
156 vtkGetStringMacro(Title);
158
160
163 void SetExponent(const char* t);
164 vtkGetStringMacro(Exponent);
166
168
172 vtkSetMacro(MajorTickSize, double);
173 vtkGetMacro(MajorTickSize, double);
175
177
181 vtkSetMacro(MinorTickSize, double);
182 vtkGetMacro(MinorTickSize, double);
184
186 {
187 VTK_TICKS_INSIDE = 0,
188 VTK_TICKS_OUTSIDE = 1,
189 VTK_TICKS_BOTH = 2
190 };
191
193
199 vtkSetClampMacro(TickLocation, int, VTK_TICKS_INSIDE, VTK_TICKS_BOTH);
200 vtkGetMacro(TickLocation, int);
202
203 void SetTickLocationToInside() { this->SetTickLocation(VTK_TICKS_INSIDE); }
204 void SetTickLocationToOutside() { this->SetTickLocation(VTK_TICKS_OUTSIDE); }
205 void SetTickLocationToBoth() { this->SetTickLocation(VTK_TICKS_BOTH); }
206
208
212 vtkSetMacro(AxisVisibility, bool);
213 vtkGetMacro(AxisVisibility, bool);
214 vtkBooleanMacro(AxisVisibility, bool);
216
218
222 vtkSetMacro(TickVisibility, bool);
223 vtkGetMacro(TickVisibility, bool);
224 vtkBooleanMacro(TickVisibility, bool);
226
228
232 vtkSetMacro(LabelVisibility, bool);
233 vtkGetMacro(LabelVisibility, bool);
234 vtkBooleanMacro(LabelVisibility, bool);
236
238
242 vtkSetMacro(TitleVisibility, bool);
243 vtkGetMacro(TitleVisibility, bool);
244 vtkBooleanMacro(TitleVisibility, bool);
246
248
252 vtkSetMacro(ExponentVisibility, bool);
253 vtkGetMacro(ExponentVisibility, bool);
254 vtkBooleanMacro(ExponentVisibility, bool);
256
258
262 vtkSetMacro(LastMajorTickPointCorrection, bool);
263 vtkGetMacro(LastMajorTickPointCorrection, bool);
264 vtkBooleanMacro(LastMajorTickPointCorrection, bool);
266
268 {
269 VTK_ALIGN_TOP = 0,
270 VTK_ALIGN_BOTTOM = 1,
271 VTK_ALIGN_POINT1 = 2,
272 VTK_ALIGN_POINT2 = 3
273 };
274
276
281 virtual void SetTitleAlignLocation(int location);
282 vtkGetMacro(TitleAlignLocation, int);
284
286
291 virtual void SetExponentLocation(int location);
292 vtkGetMacro(ExponentLocation, int);
294
296
302
304
310
312
318
320
326
328
334
336
342
344
350
352
358
360
366
368
372 vtkSetMacro(DrawGridlines, bool);
373 vtkGetMacro(DrawGridlines, bool);
374 vtkBooleanMacro(DrawGridlines, bool);
376
378
384 vtkSetMacro(DrawGridlinesOnly, bool);
385 vtkGetMacro(DrawGridlinesOnly, bool);
386 vtkBooleanMacro(DrawGridlinesOnly, bool);
388
389 vtkSetMacro(DrawGridlinesLocation, int);
390 vtkGetMacro(DrawGridlinesLocation, int);
391
393
397 vtkSetMacro(DrawInnerGridlines, bool);
398 vtkGetMacro(DrawInnerGridlines, bool);
399 vtkBooleanMacro(DrawInnerGridlines, bool);
401
403
407 vtkSetMacro(GridlineXLength, double);
408 vtkGetMacro(GridlineXLength, double);
409 vtkSetMacro(GridlineYLength, double);
410 vtkGetMacro(GridlineYLength, double);
411 vtkSetMacro(GridlineZLength, double);
412 vtkGetMacro(GridlineZLength, double);
414
416
420 vtkSetMacro(DrawGridpolys, bool);
421 vtkGetMacro(DrawGridpolys, bool);
422 vtkBooleanMacro(DrawGridpolys, bool);
424
426 {
427 VTK_AXIS_TYPE_X = 0,
428 VTK_AXIS_TYPE_Y = 1,
429 VTK_AXIS_TYPE_Z = 2
430 };
431
433
437 vtkSetClampMacro(AxisType, int, VTK_AXIS_TYPE_X, VTK_AXIS_TYPE_Z);
438 vtkGetMacro(AxisType, int);
439 void SetAxisTypeToX() { this->SetAxisType(VTK_AXIS_TYPE_X); }
440 void SetAxisTypeToY() { this->SetAxisType(VTK_AXIS_TYPE_Y); }
441 void SetAxisTypeToZ() { this->SetAxisType(VTK_AXIS_TYPE_Z); }
443
445 {
446 VTK_AXIS_POS_MINMIN = 0,
447 VTK_AXIS_POS_MINMAX = 1,
448 VTK_AXIS_POS_MAXMAX = 2,
449 VTK_AXIS_POS_MAXMIN = 3
450 };
451
453
457 vtkSetMacro(Log, bool);
458 vtkGetMacro(Log, bool);
459 vtkBooleanMacro(Log, bool);
461
463
471 vtkSetClampMacro(AxisPosition, int, VTK_AXIS_POS_MINMIN, VTK_AXIS_POS_MAXMIN);
472 vtkGetMacro(AxisPosition, int);
474
475 void SetAxisPositionToMinMin() { this->SetAxisPosition(VTK_AXIS_POS_MINMIN); }
476 void SetAxisPositionToMinMax() { this->SetAxisPosition(VTK_AXIS_POS_MINMAX); }
477 void SetAxisPositionToMaxMax() { this->SetAxisPosition(VTK_AXIS_POS_MAXMAX); }
478 void SetAxisPositionToMaxMin() { this->SetAxisPosition(VTK_AXIS_POS_MAXMIN); }
479
481
485 virtual void SetCamera(vtkCamera*);
488
490
493 int RenderOpaqueGeometry(vtkViewport* viewport) override;
496 int RenderOverlay(vtkViewport* viewport) override;
499
506
507 double ComputeMaxLabelLength(const double[3]);
508 double ComputeTitleLength(const double[3]);
509
510 void SetLabelScale(double scale);
511 void SetLabelScale(int labelIndex, double scale);
512 void SetTitleScale(double scale);
513
515
519 vtkSetMacro(MinorStart, double);
520 vtkGetMacro(MinorStart, double);
521 double GetMajorStart(int axis);
522 void SetMajorStart(int axis, double value);
523 vtkSetMacro(DeltaMinor, double);
524 vtkGetMacro(DeltaMinor, double);
525 double GetDeltaMajor(int axis);
526 void SetDeltaMajor(int axis, double value);
528
530
536 vtkSetMacro(MinorRangeStart, double);
537 vtkGetMacro(MinorRangeStart, double);
538 vtkSetMacro(MajorRangeStart, double);
539 vtkGetMacro(MajorRangeStart, double);
541
543
547 vtkSetMacro(DeltaRangeMinor, double);
548 vtkGetMacro(DeltaRangeMinor, double);
549 vtkSetMacro(DeltaRangeMajor, double);
550 vtkGetMacro(DeltaRangeMajor, double);
552
554
555 void BuildAxis(vtkViewport* viewport, bool);
556
558
562 vtkGetObjectMacro(TitleActor, vtkAxisFollower);
564
566
569 vtkGetObjectMacro(ExponentActor, vtkAxisFollower);
571
575 inline vtkAxisFollower** GetLabelActors() { return this->LabelActors; }
576
578
582 vtkGetObjectMacro(TitleProp3D, vtkProp3DAxisFollower);
584
588 inline vtkProp3DAxisFollower** GetLabelProps3D() { return this->LabelProps3D; }
589
591
595 vtkGetObjectMacro(ExponentProp3D, vtkProp3DAxisFollower);
597
599
603 vtkGetMacro(NumberOfLabelsBuilt, int);
605
607
611 vtkSetMacro(CalculateTitleOffset, bool);
612 vtkGetMacro(CalculateTitleOffset, bool);
613 vtkBooleanMacro(CalculateTitleOffset, bool);
615
617
621 vtkSetMacro(CalculateLabelOffset, bool);
622 vtkGetMacro(CalculateLabelOffset, bool);
623 vtkBooleanMacro(CalculateLabelOffset, bool);
625
627
631 vtkSetMacro(Use2DMode, bool);
632 vtkGetMacro(Use2DMode, bool);
634
636
640 vtkSetMacro(VerticalOffsetXTitle2D, double);
641 vtkGetMacro(VerticalOffsetXTitle2D, double);
643
645
649 vtkSetMacro(HorizontalOffsetYTitle2D, double);
650 vtkGetMacro(HorizontalOffsetYTitle2D, double);
652
654
658 vtkSetMacro(SaveTitlePosition, int);
659 vtkGetMacro(SaveTitlePosition, int);
661
663
667 vtkSetVector3Macro(AxisBaseForX, double);
668 vtkGetVector3Macro(AxisBaseForX, double);
670
672
676 vtkSetVector3Macro(AxisBaseForY, double);
677 vtkGetVector3Macro(AxisBaseForY, double);
679
681
685 vtkSetVector3Macro(AxisBaseForZ, double);
686 vtkGetVector3Macro(AxisBaseForZ, double);
688
690
694 vtkSetMacro(AxisOnOrigin, bool);
695 vtkGetMacro(AxisOnOrigin, bool);
697
699
703 vtkSetMacro(ScreenSize, double);
704 vtkGetMacro(ScreenSize, double);
706
708
712 vtkSetMacro(LabelOffset, double);
713 vtkGetMacro(LabelOffset, double);
715
717
721 vtkSetMacro(ExponentOffset, double);
722 vtkGetMacro(ExponentOffset, double);
724
726
733 VTK_DEPRECATED_IN_9_3_0("Use SetTitleOffset(double, double) as it's now a 2d vector")
734 void SetTitleOffset(double titleOffsetY);
735 VTK_DEPRECATED_IN_9_3_0("Use GetTitleOffset(double&, double&) as it's now a 2d vector")
736 double GetTitleOffset();
737 vtkSetVector2Macro(TitleOffset, double);
738 // TODO: Replace getter with macro once deprecated one is removed
739 void GetTitleOffset(double& titleOffsetX, double& titleOffsetY);
741
742protected:
744 ~vtkAxisActor() override;
745
746 char* Title = nullptr;
747 char* Exponent = nullptr;
748 char* LabelFormat = nullptr;
749 double Range[2] = { 0.0, 1.0 };
750 double LastRange[2] = { -1.0, -1.0 };
751 bool UseTextActor3D = false;
752 int NumberOfLabelsBuilt = 0;
753 bool MinorTicksVisible = true;
754 bool LastMinorTicksVisible = true;
755
761 int TickLocation = VTK_TICKS_INSIDE;
762
767 int TitleAlignLocation = VTK_ALIGN_BOTTOM;
768
773 int ExponentLocation = VTK_ALIGN_POINT2;
774
775 bool DrawGridlines = false;
776 bool DrawGridlinesOnly = false;
777 bool LastDrawGridlines = false;
778 int DrawGridlinesLocation = 0; // 0: all | 1: closest | 2: furthest
779 int LastDrawGridlinesLocation = 0; // 0: all | 1: closest | 2: furthest
780 double GridlineXLength = 1.0;
781 double GridlineYLength = 1.0;
782 double GridlineZLength = 1.0;
783
784 bool DrawInnerGridlines = false;
785 bool LastDrawInnerGridlines = false;
786
787 bool DrawGridpolys = false;
788 bool LastDrawGridpolys = false;
789
790 bool AxisVisibility = true;
791 bool TickVisibility = true;
792 bool LastTickVisibility = true;
793 bool LabelVisibility = true;
794 bool TitleVisibility = true;
795 bool ExponentVisibility = false;
796 bool LastMajorTickPointCorrection = false;
797
798 bool Log = false;
799 int AxisType = VTK_AXIS_TYPE_X;
800 int AxisPosition = VTK_AXIS_POS_MINMIN;
801
802 // coordinate system for axisAxtor, relative to world coordinates
803 double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
804 double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
805 double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
806
807private:
808 vtkAxisActor(const vtkAxisActor&) = delete;
809 void operator=(const vtkAxisActor&) = delete;
810
811 void TransformBounds(vtkViewport*, double bnds[6]);
812
813 void BuildLabels(vtkViewport*, bool);
814 void BuildLabels2D(vtkViewport*, bool);
815 void SetLabelPositions(vtkViewport*, bool);
816 void SetLabelPositions2D(vtkViewport*, bool);
817
822 void RotateActor2DFromAxisProjection(vtkTextActor* pActor2D);
823
827 void InitTitle();
828
832 void InitExponent();
833
840 void BuildTitle(bool);
841
846 void BuildExponent(bool force);
847
848 void BuildExponent2D(vtkViewport* viewport, bool force);
849
850 void BuildTitle2D(vtkViewport* viewport, bool);
851
852 void SetAxisPointsAndLines();
853
854 bool BuildTickPoints(double p1[3], double p2[3], bool force);
855
856 // Build major ticks for linear scale.
857 void BuildMajorTicks(double p1[3], double p2[3], double localCoordSys[3][3]);
858
859 // Build major ticks for logarithmic scale.
860 void BuildMajorTicksLog(double p1[3], double p2[3], double localCoordSys[3][3]);
861
862 // Build minor ticks for linear scale.
863 void BuildMinorTicks(double p1[3], double p2[3], double localCoordSys[3][3]);
864
865 // Build minor ticks for logarithmic scale enabled
866 void BuildMinorTicksLog(double p1[3], double p2[3], double localCoordSys[3][3]);
867
868 void BuildAxisGridLines(double p1[3], double p2[3], double localCoordSys[3][3]);
869
870 bool TickVisibilityChanged();
871 vtkProperty* NewTitleProperty();
872 vtkProperty2D* NewTitleProperty2D();
873 vtkProperty* NewLabelProperty();
874
875 bool BoundsDisplayCoordinateChanged(vtkViewport* viewport);
876
877 vtkNew<vtkCoordinate> Point1Coordinate;
878 vtkNew<vtkCoordinate> Point2Coordinate;
879
880 double MajorTickSize = 1.0;
881 double MinorTickSize = 0.5;
882
883 // For each axis (for the inner gridline generation)
884 double MajorStart[3] = { 0.0, 0.0, 0.0 };
885 double DeltaMajor[3] = { 1.0, 1.0, 1.0 };
886 double MinorStart = 0.0;
887 double DeltaMinor = 1.0;
888
889 // For the ticks, w.r.t to the set range
890 double MajorRangeStart = 0.0;
891 double MinorRangeStart = 0.0;
892
896 double DeltaRangeMinor = 1.0;
897
901 double DeltaRangeMajor = 1.0;
902
903 int LastAxisPosition = -1;
904 int LastTickLocation = -1;
905
906 vtkNew<vtkPoints> MinorTickPts;
907 vtkNew<vtkPoints> MajorTickPts;
908 vtkNew<vtkPoints> GridlinePts;
909 vtkNew<vtkPoints> InnerGridlinePts;
910 vtkNew<vtkPoints> GridpolyPts;
911
912 vtkNew<vtkVectorText> TitleVector;
913 vtkNew<vtkPolyDataMapper> TitleMapper;
914 vtkNew<vtkAxisFollower> TitleActor;
915 vtkNew<vtkTextActor> TitleActor2D;
917 vtkNew<vtkTextActor3D> TitleActor3D;
918 vtkSmartPointer<vtkTextProperty> TitleTextProperty;
919
921
924 vtkNew<vtkVectorText> ExponentVector;
925 vtkNew<vtkPolyDataMapper> ExponentMapper;
926 vtkNew<vtkAxisFollower> ExponentActor;
927 vtkNew<vtkTextActor> ExponentActor2D;
928 vtkNew<vtkProp3DAxisFollower> ExponentProp3D;
929 vtkNew<vtkTextActor3D> ExponentActor3D;
931
932 vtkSmartPointer<vtkVectorText>* LabelVectors = nullptr;
933 vtkSmartPointer<vtkPolyDataMapper>* LabelMappers = nullptr;
934 vtkAxisFollower** LabelActors = nullptr;
935 vtkProp3DAxisFollower** LabelProps3D = nullptr;
936 vtkSmartPointer<vtkTextActor>* LabelActors2D = nullptr;
937 vtkSmartPointer<vtkTextActor3D>* LabelActors3D = nullptr;
938 vtkSmartPointer<vtkTextProperty> LabelTextProperty;
939
940 // Main line axis
941 vtkNew<vtkPolyData> AxisLines;
942 vtkNew<vtkPolyDataMapper> AxisLinesMapper;
943 vtkNew<vtkActor> AxisLinesActor;
944
945 // Ticks of the axis
946 vtkNew<vtkPolyData> AxisMajorTicks, AxisMinorTicks;
947 vtkNew<vtkPolyDataMapper> AxisMajorTicksMapper, AxisMinorTicksMapper;
948 vtkNew<vtkActor> AxisMajorTicksActor, AxisMinorTicksActor;
949
950 vtkNew<vtkPolyData> Gridlines;
951 vtkNew<vtkPolyDataMapper> GridlinesMapper;
952 vtkNew<vtkActor> GridlinesActor;
953 vtkNew<vtkPolyData> InnerGridlines;
954 vtkNew<vtkPolyDataMapper> InnerGridlinesMapper;
955 vtkNew<vtkActor> InnerGridlinesActor;
956 vtkNew<vtkPolyData> Gridpolys;
957 vtkNew<vtkPolyDataMapper> GridpolysMapper;
958 vtkNew<vtkActor> GridpolysActor;
959
961 vtkTimeStamp BuildTime;
962 vtkTimeStamp BuildTickPointsTime;
963 vtkTimeStamp BoundsTime;
964 vtkTimeStamp LabelBuildTime;
965 vtkTimeStamp TitleTextTime;
966 vtkTimeStamp ExponentTextTime;
967
968 bool AxisOnOrigin = false;
969
970 bool AxisHasZeroLength = false;
971
972 bool CalculateTitleOffset = false;
973 bool CalculateLabelOffset = false;
974
978 bool Use2DMode = false;
979
984 double VerticalOffsetXTitle2D = -40;
985
990 double HorizontalOffsetYTitle2D = -50;
991
998 int SaveTitlePosition = 0;
999
1003 double TitleConstantPosition[2] = { 0.0, 0.0 };
1004
1008 bool NeedBuild2D = false;
1009
1010 double LastMinDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1011 double LastMaxDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1012 double TickVector[3] = { 0.0, 0.0, 0.0 };
1013
1017 double ScreenSize = 10.0;
1018
1020
1023 double LabelOffset = 30.0;
1024 double TitleOffset[2] = { 20.0, 20.0 };
1025 double ExponentOffset = 20.0;
1027};
1028
1029VTK_ABI_NAMESPACE_END
1030#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:41
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:41
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:33
a simple class to control print indentation
Definition vtkIndent.h:29
Allocate and hold a VTK object.
Definition vtkNew.h:51
represent and manipulate 3D points
Definition vtkPoints.h:29
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:80
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
Definition vtkProperty.h:57
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:45
window superclass for vtkRenderWindow
Definition vtkWindow.h:25
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_3_0(reason)
#define VTK_SIZEHINT(...)