VTK  9.6.1
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
43
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
53
54#include <memory>
55#include <string>
56
57VTK_ABI_NAMESPACE_BEGIN
58class vtkAxisFollower;
59class vtkCamera;
60class vtkCoordinate;
61class vtkPoints;
62class vtkPolyData;
65class vtkStringArray;
66class vtkTextActor;
68class vtkTextActor3D;
69class vtkTextProperty;
70class vtkVectorText;
71
72class VTKRENDERINGANNOTATION_EXPORT VTK_MARSHALAUTO vtkAxisActor : public vtkActor
73{
74public:
75 vtkTypeMacro(vtkAxisActor, vtkActor);
76 void PrintSelf(ostream& os, vtkIndent indent) override;
77
81 static vtkAxisActor* New();
82
84
88 virtual void SetPoint1(double x[3]) { this->SetPoint1(x[0], x[1], x[2]); }
89 virtual void SetPoint1(double x, double y, double z);
90 virtual double* GetPoint1();
92
94
98 virtual void SetPoint2(double x[3]) { this->SetPoint2(x[0], x[1], x[2]); }
99 virtual void SetPoint2(double x, double y, double z);
100 virtual double* GetPoint2();
102
104
109 vtkSetVector2Macro(Range, double);
110 vtkGetVectorMacro(Range, double, 2);
112
114
118 void SetBounds(const double bounds[6]);
119 void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
120 double* GetBounds() VTK_SIZEHINT(6) override;
121 void GetBounds(double bounds[6]);
123
125
128 void SetLabelFormat(const char* format);
129 vtkGetStringMacro(LabelFormat);
131
133
140 vtkSetMacro(UseTextActor3D, bool);
141 vtkGetMacro(UseTextActor3D, bool);
143
145
149 vtkSetMacro(MinorTicksVisible, bool);
150 vtkGetMacro(MinorTicksVisible, bool);
151 vtkBooleanMacro(MinorTicksVisible, bool);
153
155
158 void SetTitle(const std::string& title);
159 vtkGetMacro(Title, std::string);
161
163
166 void SetExponent(const std::string& exp);
167 vtkGetMacro(Exponent, std::string);
169
171
175 vtkSetMacro(MajorTickSize, double);
176 vtkGetMacro(MajorTickSize, double);
178
180
184 vtkSetMacro(MinorTickSize, double);
185 vtkGetMacro(MinorTickSize, double);
187
194
196
203 vtkGetMacro(TickLocation, int);
205
209
211
215 vtkSetMacro(AxisVisibility, bool);
216 vtkGetMacro(AxisVisibility, bool);
217 vtkBooleanMacro(AxisVisibility, bool);
219
221
225 vtkSetMacro(TickVisibility, bool);
226 vtkGetMacro(TickVisibility, bool);
227 vtkBooleanMacro(TickVisibility, bool);
229
231
235 vtkSetMacro(LabelVisibility, bool);
236 vtkGetMacro(LabelVisibility, bool);
237 vtkBooleanMacro(LabelVisibility, bool);
239
241
245 vtkSetMacro(TitleVisibility, bool);
246 vtkGetMacro(TitleVisibility, bool);
247 vtkBooleanMacro(TitleVisibility, bool);
249
251
255 vtkSetMacro(ExponentVisibility, bool);
256 vtkGetMacro(ExponentVisibility, bool);
257 vtkBooleanMacro(ExponentVisibility, bool);
259
261
265 vtkSetMacro(LastMajorTickPointCorrection, bool);
266 vtkGetMacro(LastMajorTickPointCorrection, bool);
267 vtkBooleanMacro(LastMajorTickPointCorrection, bool);
269
277
279
284 virtual void SetTitleAlignLocation(int location);
285 vtkGetMacro(TitleAlignLocation, int);
287
289
294 virtual void SetExponentLocation(int location);
295 vtkGetMacro(ExponentLocation, int);
297
299
305
307
313
315
321
323
329
331
337
339
345
347
353
355
361
363
369
371
375 vtkSetMacro(DrawGridlines, bool);
376 vtkGetMacro(DrawGridlines, bool);
377 vtkBooleanMacro(DrawGridlines, bool);
379
381
387 vtkSetMacro(DrawGridlinesOnly, bool);
388 vtkGetMacro(DrawGridlinesOnly, bool);
389 vtkBooleanMacro(DrawGridlinesOnly, bool);
391
392 vtkSetMacro(DrawGridlinesLocation, int);
393 vtkGetMacro(DrawGridlinesLocation, int);
394
396
400 vtkSetMacro(DrawInnerGridlines, bool);
401 vtkGetMacro(DrawInnerGridlines, bool);
402 vtkBooleanMacro(DrawInnerGridlines, bool);
404
406
410 vtkSetMacro(GridlineXLength, double);
411 vtkGetMacro(GridlineXLength, double);
412 vtkSetMacro(GridlineYLength, double);
413 vtkGetMacro(GridlineYLength, double);
414 vtkSetMacro(GridlineZLength, double);
415 vtkGetMacro(GridlineZLength, double);
417
419
423 vtkSetMacro(DrawGridpolys, bool);
424 vtkGetMacro(DrawGridpolys, bool);
425 vtkBooleanMacro(DrawGridpolys, bool);
427
434
436
440 vtkSetClampMacro(AxisType, int, VTK_AXIS_TYPE_X, VTK_AXIS_TYPE_Z);
441 vtkGetMacro(AxisType, int);
446
454
456
460 vtkSetMacro(Log, bool);
461 vtkGetMacro(Log, bool);
462 vtkBooleanMacro(Log, bool);
464
466
475 vtkGetMacro(AxisPosition, int);
477
482
484
488 virtual void SetCamera(vtkCamera*);
491
493
496 int RenderOpaqueGeometry(vtkViewport* viewport) override;
499 int RenderOverlay(vtkViewport* viewport) override;
502
509
511
515 VTK_DEPRECATED_IN_9_5_0("Argument is not used anymore, please use the variant without argument")
516 double ComputeMaxLabelLength(const double[3]) { return this->ComputeMaxLabelLength(); }
519
521
525 VTK_DEPRECATED_IN_9_5_0("Argument is not used anymore, please use the variant without argument")
526 double ComputeTitleLength(const double[3]) { return this->ComputeTitleLength(); }
529
531
534 void SetLabelScale(double scale);
535 void SetLabelScale(int labelIndex, double scale);
536 void SetTitleScale(double scale);
537 void SetExponentScale(double scale);
539
541
547 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") void SetMinorStart(double){};
548 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") double GetMinorStart() { return 0.; };
549
550 double GetMajorStart(int axis);
551 void SetMajorStart(int axis, double value);
552
553 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") void SetDeltaMinor(double){};
554 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") double GetDeltaMinor() { return 1.; };
555
556 double GetDeltaMajor(int axis);
557 void SetDeltaMajor(int axis, double value);
559
561
567 vtkSetMacro(MinorRangeStart, double);
568 vtkGetMacro(MinorRangeStart, double);
569 vtkSetMacro(MajorRangeStart, double);
570 vtkGetMacro(MajorRangeStart, double);
572
574
578 vtkSetMacro(DeltaRangeMinor, double);
579 vtkGetMacro(DeltaRangeMinor, double);
580 vtkSetMacro(DeltaRangeMajor, double);
581 vtkGetMacro(DeltaRangeMajor, double);
583
585
586 void BuildAxis(vtkViewport* viewport, bool);
587
593
598
600
603 VTK_DEPRECATED_IN_9_5_0("This is not safe. Use GetLabelFollower instead.")
608
610
616
618
621 VTK_DEPRECATED_IN_9_5_0("This is not safe. Use GetLabelFollower3D instead.")
626
628
634
636
640 vtkGetMacro(NumberOfLabelsBuilt, int);
642
644
648 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") vtkSetMacro(CalculateTitleOffset, bool);
649 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") vtkGetMacro(CalculateTitleOffset, bool);
650 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") void CalculateTitleOffsetOn() {}
651 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") void CalculateTitleOffsetOff() {}
653
655
659 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") vtkSetMacro(CalculateLabelOffset, bool);
660 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") vtkGetMacro(CalculateLabelOffset, bool);
661 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") void CalculateLabelOffsetOn() {}
662 VTK_DEPRECATED_IN_9_5_0("Member is not used anymore") void CalculateLabelOffsetOff() {}
664
666
670 vtkSetMacro(Use2DMode, bool);
671 vtkGetMacro(Use2DMode, bool);
673
675
679 vtkSetMacro(VerticalOffsetXTitle2D, double);
680 vtkGetMacro(VerticalOffsetXTitle2D, double);
682
684
688 vtkSetMacro(HorizontalOffsetYTitle2D, double);
689 vtkGetMacro(HorizontalOffsetYTitle2D, double);
691
693
697 vtkSetMacro(SaveTitlePosition, int);
698 vtkGetMacro(SaveTitlePosition, int);
700
702
706 vtkSetVector3Macro(AxisBaseForX, double);
707 vtkGetVector3Macro(AxisBaseForX, double);
709
711
715 vtkSetVector3Macro(AxisBaseForY, double);
716 vtkGetVector3Macro(AxisBaseForY, double);
718
720
724 vtkSetVector3Macro(AxisBaseForZ, double);
725 vtkGetVector3Macro(AxisBaseForZ, double);
727
729
733 vtkSetMacro(AxisOnOrigin, bool);
734 vtkGetMacro(AxisOnOrigin, bool);
736
738
742 vtkSetMacro(ScreenSize, double);
743 vtkGetMacro(ScreenSize, double);
745
747
751 vtkSetMacro(LabelOffset, double);
752 vtkGetMacro(LabelOffset, double);
754
756
760 vtkSetMacro(ExponentOffset, double);
761 vtkGetMacro(ExponentOffset, double);
763
765
772 vtkSetVector2Macro(TitleOffset, double);
773 vtkGetVector2Macro(TitleOffset, double);
775
776protected:
778 ~vtkAxisActor() override;
779
780private:
781 vtkAxisActor(const vtkAxisActor&) = delete;
782 void operator=(const vtkAxisActor&) = delete;
783
784 void TransformBounds(vtkViewport*, double bnds[6]);
785
786 void BuildLabels(vtkViewport*, bool);
787 void BuildLabels2D(vtkViewport*, bool);
788 void SetLabelPositions(vtkViewport*, bool);
789 void SetLabelPositions2D(vtkViewport*, bool);
790
797 void BuildTitle(bool);
798
803 void BuildExponent(bool force);
804
805 void BuildExponent2D(vtkViewport* viewport, bool force);
806
807 void BuildTitle2D(vtkViewport* viewport, bool);
808
812 void Get2DPosition(
813 vtkViewport* viewport, double multiplier, double scenepos[3], double displayPos[2]);
814
815 void SetAxisPointsAndLines();
816
817 bool BuildTickPoints(double p1[3], double p2[3], bool force);
818
819 // Build major ticks for linear scale.
820 void BuildMajorTicks(double p1[3], double p2[3], double localCoordSys[3][3]);
821
822 // Build major ticks for logarithmic scale.
823 void BuildMajorTicksLog(double p1[3], double p2[3], double localCoordSys[3][3]);
824
825 // Build minor ticks for linear scale.
826 void BuildMinorTicks(double p1[3], double p2[3], double localCoordSys[3][3]);
827
828 // Build minor ticks for logarithmic scale enabled
829 void BuildMinorTicksLog(double p1[3], double p2[3], double localCoordSys[3][3]);
830
831 void BuildAxisGridLines(double p1[3], double p2[3], double localCoordSys[3][3]);
832
833 bool TickVisibilityChanged();
834
835 vtkProperty* NewTitleProperty();
836 vtkProperty* NewLabelProperty();
837
838 bool BoundsDisplayCoordinateChanged(vtkViewport* viewport);
839
841
844 vtkProp* GetTitleActorInternal();
845 vtkProp* GetLabelActorInternal(int index);
846 vtkProp* GetExponentActorInternal();
848
858 void UpdateTitleActorProperty();
859 void UpdateLabelActorProperty(int idx);
860 void UpdateExponentActorProperty();
862
868 void GetTranslucentProps(vtkPropCollection* collection);
869
870 std::string Title;
871 std::string Exponent;
872 char* LabelFormat = nullptr;
873 double Range[2] = { 0.0, 1.0 };
874 double LastRange[2] = { -1.0, -1.0 };
875 bool UseTextActor3D = false;
876 int NumberOfLabelsBuilt = 0;
877 bool MinorTicksVisible = true;
878 bool LastMinorTicksVisible = true;
879
885 int TickLocation = VTK_TICKS_INSIDE;
886
891 int TitleAlignLocation = VTK_ALIGN_BOTTOM;
892
897 int ExponentLocation = VTK_ALIGN_POINT2;
898
899 bool DrawGridlines = false;
900 bool DrawGridlinesOnly = false;
901 bool LastDrawGridlines = false;
902 int DrawGridlinesLocation = 0; // 0: all | 1: closest | 2: furthest
903 int LastDrawGridlinesLocation = 0; // 0: all | 1: closest | 2: furthest
904 double GridlineXLength = 1.0;
905 double GridlineYLength = 1.0;
906 double GridlineZLength = 1.0;
907
908 bool DrawInnerGridlines = false;
909
910 bool DrawGridpolys = false;
911
912 bool AxisVisibility = true;
913 bool TickVisibility = true;
914 bool LastTickVisibility = true;
915 bool LabelVisibility = true;
916 bool TitleVisibility = true;
917 bool ExponentVisibility = false;
918 bool LastMajorTickPointCorrection = false;
919
920 bool Log = false;
921 int AxisType = VTK_AXIS_TYPE_X;
922 int AxisPosition = VTK_AXIS_POS_MINMIN;
923
924 // coordinate system for axisAxtor, relative to world coordinates
925 double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
926 double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
927 double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
928
929 vtkNew<vtkCoordinate> Point1Coordinate;
930 vtkNew<vtkCoordinate> Point2Coordinate;
931
932 double MajorTickSize = 1.0;
933 double MinorTickSize = 0.5;
934
935 // For each axis (for the inner gridline generation)
936 double MajorStart[3] = { 0.0, 0.0, 0.0 };
937 double DeltaMajor[3] = { 1.0, 1.0, 1.0 };
938
939 // For the ticks, w.r.t to the set range
940 double MajorRangeStart = 0.0;
941 double MinorRangeStart = 0.0;
942
946 double DeltaRangeMinor = 1.0;
947
951 double DeltaRangeMajor = 1.0;
952
953 int LastAxisPosition = -1;
954 int LastTickLocation = -1;
955
956 vtkNew<vtkPoints> MinorTickPts;
957 vtkNew<vtkPoints> MajorTickPts;
958 vtkNew<vtkPoints> GridlinePts;
959 vtkNew<vtkPoints> InnerGridlinePts;
960 vtkNew<vtkPoints> GridpolyPts;
961
962 std::unique_ptr<vtkTextActorInterfaceInternal> TitleProp;
963 vtkSmartPointer<vtkTextProperty> TitleTextProperty;
964
966
969 std::unique_ptr<vtkTextActorInterfaceInternal> ExponentProp;
971
972 std::vector<std::shared_ptr<vtkTextActorInterfaceInternal>> LabelProps;
973 vtkSmartPointer<vtkTextProperty> LabelTextProperty;
974
975 // VTK_DEPRECATED_IN_9_5_0
976 std::vector<vtkAxisFollower*> LabelActors;
977 // VTK_DEPRECATED_IN_9_5_0
978 std::vector<vtkProp3DAxisFollower*> LabelProps3D;
979
980 // Main line axis
981 vtkNew<vtkPolyData> AxisLines;
982 vtkNew<vtkActor> AxisLinesActor;
983
984 // Ticks of the axis
985 vtkNew<vtkPolyData> AxisMajorTicks, AxisMinorTicks;
986 vtkNew<vtkActor> AxisMajorTicksActor, AxisMinorTicksActor;
987
988 vtkNew<vtkPolyData> Gridlines;
989 vtkNew<vtkActor> GridlinesActor;
990 vtkNew<vtkPolyData> InnerGridlines;
991 vtkNew<vtkActor> InnerGridlinesActor;
992 vtkNew<vtkPolyData> Gridpolys;
993 vtkNew<vtkActor> GridpolysActor;
994
995 vtkSmartPointer<vtkCamera> Camera;
996 vtkTimeStamp BuildTime;
997 vtkTimeStamp BuildTickPointsTime;
998 vtkTimeStamp BoundsTime;
999 vtkTimeStamp LabelBuildTime;
1000 vtkTimeStamp TitleTextTime;
1001 vtkTimeStamp ExponentTextTime;
1002
1003 bool AxisOnOrigin = false;
1004
1005 bool AxisHasZeroLength = false;
1006
1007 bool CalculateTitleOffset = false; // VTK_DEPRECATED_IN_9_5_0
1008 bool CalculateLabelOffset = false; // VTK_DEPRECATED_IN_9_5_0
1009
1013 bool Use2DMode = false;
1014
1019 double VerticalOffsetXTitle2D = -40;
1020
1025 double HorizontalOffsetYTitle2D = -50;
1026
1033 int SaveTitlePosition = 0;
1034
1038 double TitleConstantPosition[2] = { 0.0, 0.0 };
1039
1043 bool NeedBuild2D = false;
1044
1045 double LastMinDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1046 double LastMaxDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1047 double TickVector[3] = { 0.0, 0.0, 0.0 };
1048
1052 double ScreenSize = 10.0;
1053
1055
1058 double LabelOffset = 30.0;
1059 double TitleOffset[2] = { 20.0, 20.0 };
1060 double ExponentOffset = 20.0;
1062};
1063
1064VTK_ABI_NAMESPACE_END
1065#endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetTickLocationToBoth()
void CalculateLabelOffsetOn()
Set/Get flag whether to calculate label offset.
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.
void SetMinorStart(double)
Set/Get the starting position for minor and major tick points, and the delta values that determine th...
void CalculateLabelOffsetOff()
Set/Get flag whether to calculate label offset.
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.
double GetMinorStart()
Set/Get the starting position for minor and major tick points, and the delta values that determine th...
double ComputeTitleLength()
Compute the diagonal length of the Title text.
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.
double GetDeltaMinor()
Set/Get the starting position for minor and major tick points, and the delta values that determine th...
vtkTypeBool HasTranslucentPolygonalGeometry() override
Draw the axis.
~vtkAxisActor() override
double ComputeMaxLabelLength(const double[3])
Compute the max diagonal lentgh of the labels.
void SetExponent(const std::string &exp)
Set/Get the common exponent of the labels values.
double GetMajorStart(int axis)
Set/Get the starting position for minor and major tick points, and the delta values that determine th...
int GetNumberOfLabelFollower3D()
Get label actors responsigle for drawing label text.
void SetGridlinesProperty(vtkProperty *)
Get/Set gridlines actor property (outer grid lines).
void SetAxisTypeToZ()
Set/Get the type of this axis.
double ComputeMaxLabelLength()
Compute the max diagonal lentgh of the labels.
void SetTitle(const std::string &title)
Set/Get the title of the axis actor.
vtkProperty * GetGridpolysProperty()
Get/Set gridPolys actor property (grid quads).
int GetNumberOfLabelFollowers()
Get label actors responsigle for drawing label text.
void CalculateTitleOffsetOn()
Set/Get flag whether to calculate title offset.
void SetLabelFormat(const char *format)
Set/Get the std::format or printf style format with which to print the labels on the axis.
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...
vtkProp3DAxisFollower * GetLabelFollower3D(int index)
Get label actors responsigle for drawing label text.
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)
Set scale on underlying actor.
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 CalculateTitleOffsetOff()
Set/Get flag whether to calculate title offset.
void SetLabelScale(double scale)
Set scale on underlying actor.
void SetTickLocationToOutside()
void SetExponentScale(double scale)
Set scale on underlying actor.
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.
vtkAxisFollower * GetExponentActor()
Get exponent follower actor.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Draw the axis.
virtual void SetAxisType(int)
Set/Get the type of this axis.
virtual void SetAxisPosition(int)
Set/Get the position of this axis (in relation to an an assumed bounding box).
void SetAxisTypeToX()
Set/Get the type of this axis.
virtual void SetTickLocation(int)
Set/Get the location of the ticks.
void SetTitleScale(double scale)
Set scale on underlying actor.
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.
vtkAxisFollower * GetTitleActor()
Get title actor and it is responsible for drawing title text.
virtual void SetTitleTextProperty(vtkTextProperty *p)
Set/Get the axis title text property.
double ComputeTitleLength(const double[3])
Compute the diagonal length of the Title text.
void SetAxisPositionToMaxMin()
virtual vtkCoordinate * GetPoint1Coordinate()
Specify the position of the first point defining the axis.
virtual int RenderTranslucentGeometry(vtkViewport *viewport)
Draw the axis.
virtual int GetNumberOfLabelsBuilt()
Get total number of labels built.
vtkProp3DAxisFollower ** GetLabelProps3D()
Get label actors responsigle for drawing label text.
void SetTickLocationToInside()
void SetLabels(vtkStringArray *labels)
vtkAxisFollower * GetLabelFollower(int index)
Get label actors responsigle for drawing label text.
vtkProperty * GetAxisMinorTicksProperty()
Get/Set axis actor property (axis and its ticks).
vtkProp3DAxisFollower * GetExponentProp3D()
Get title actor and it is responsible for drawing title text.
void SetDeltaMinor(double)
Set/Get the starting position for minor and major tick points, and the delta values that determine th...
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...
vtkProp3DAxisFollower * GetTitleProp3D()
Get title actor and it is responsible for drawing title text.
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:42
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition vtkIndent.h:29
represent and manipulate 3D points
Definition vtkPoints.h:30
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:72
a subclass of vtkProp3DFollower that ensures that data is always parallel to the axis defined by a vt...
an ordered list of Props
represent surface properties of a geometric object
Definition vtkProperty.h:60
a vtkAbstractArray subclass for strings
An actor that displays text.
VTK Internal interface to manipulate text actors from vtkAxisActor.
An actor that displays text.
represent text properties.
create polygonal text
abstract specification for Viewports
Definition vtkViewport.h:47
window superclass for vtkRenderWindow
Definition vtkWindow.h:29
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_5_0(reason)
vtkTimeStamp BuildTime
vtkCamera * Camera
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO