49#include "vtkRenderingAnnotationModule.h"
56VTK_ABI_NAMESPACE_BEGIN
88 virtual void SetPoint1(
double x,
double y,
double z);
98 virtual void SetPoint2(
double x,
double y,
double z);
108 vtkSetVector2Macro(Range,
double);
109 vtkGetVectorMacro(Range,
double, 2);
118 void SetBounds(
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
128 vtkGetStringMacro(LabelFormat);
139 vtkSetMacro(UseTextActor3D,
bool);
140 vtkGetMacro(UseTextActor3D,
bool);
148 vtkSetMacro(MinorTicksVisible,
bool);
149 vtkGetMacro(MinorTicksVisible,
bool);
150 vtkBooleanMacro(MinorTicksVisible,
bool);
158 vtkGetMacro(Title,
std::
string);
166 vtkGetMacro(Exponent,
std::
string);
174 vtkSetMacro(MajorTickSize,
double);
175 vtkGetMacro(MajorTickSize,
double);
183 vtkSetMacro(MinorTickSize,
double);
184 vtkGetMacro(MinorTickSize,
double);
214 vtkSetMacro(AxisVisibility,
bool);
215 vtkGetMacro(AxisVisibility,
bool);
216 vtkBooleanMacro(AxisVisibility,
bool);
224 vtkSetMacro(TickVisibility,
bool);
225 vtkGetMacro(TickVisibility,
bool);
226 vtkBooleanMacro(TickVisibility,
bool);
234 vtkSetMacro(LabelVisibility,
bool);
235 vtkGetMacro(LabelVisibility,
bool);
236 vtkBooleanMacro(LabelVisibility,
bool);
244 vtkSetMacro(TitleVisibility,
bool);
245 vtkGetMacro(TitleVisibility,
bool);
246 vtkBooleanMacro(TitleVisibility,
bool);
254 vtkSetMacro(ExponentVisibility,
bool);
255 vtkGetMacro(ExponentVisibility,
bool);
256 vtkBooleanMacro(ExponentVisibility,
bool);
264 vtkSetMacro(LastMajorTickPointCorrection,
bool);
265 vtkGetMacro(LastMajorTickPointCorrection,
bool);
266 vtkBooleanMacro(LastMajorTickPointCorrection,
bool);
284 vtkGetMacro(TitleAlignLocation,
int);
294 vtkGetMacro(ExponentLocation,
int);
374 vtkSetMacro(DrawGridlines,
bool);
375 vtkGetMacro(DrawGridlines,
bool);
376 vtkBooleanMacro(DrawGridlines,
bool);
386 vtkSetMacro(DrawGridlinesOnly,
bool);
387 vtkGetMacro(DrawGridlinesOnly,
bool);
388 vtkBooleanMacro(DrawGridlinesOnly,
bool);
391 vtkSetMacro(DrawGridlinesLocation,
int);
392 vtkGetMacro(DrawGridlinesLocation,
int);
399 vtkSetMacro(DrawInnerGridlines,
bool);
400 vtkGetMacro(DrawInnerGridlines,
bool);
401 vtkBooleanMacro(DrawInnerGridlines,
bool);
409 vtkSetMacro(GridlineXLength,
double);
410 vtkGetMacro(GridlineXLength,
double);
411 vtkSetMacro(GridlineYLength,
double);
412 vtkGetMacro(GridlineYLength,
double);
413 vtkSetMacro(GridlineZLength,
double);
414 vtkGetMacro(GridlineZLength,
double);
422 vtkSetMacro(DrawGridpolys,
bool);
423 vtkGetMacro(DrawGridpolys,
bool);
424 vtkBooleanMacro(DrawGridpolys,
bool);
459 vtkSetMacro(Log,
bool);
460 vtkGetMacro(Log,
bool);
461 vtkBooleanMacro(Log,
bool);
549 vtkSetMacro(MinorRangeStart,
double);
550 vtkGetMacro(MinorRangeStart,
double);
551 vtkSetMacro(MajorRangeStart,
double);
552 vtkGetMacro(MajorRangeStart,
double);
560 vtkSetMacro(DeltaRangeMinor,
double);
561 vtkGetMacro(DeltaRangeMinor,
double);
562 vtkSetMacro(DeltaRangeMajor,
double);
563 vtkGetMacro(DeltaRangeMajor,
double);
618 vtkGetMacro(NumberOfLabelsBuilt,
int);
626 vtkSetMacro(Use2DMode,
bool);
627 vtkGetMacro(Use2DMode,
bool);
635 vtkSetMacro(VerticalOffsetXTitle2D,
double);
636 vtkGetMacro(VerticalOffsetXTitle2D,
double);
644 vtkSetMacro(HorizontalOffsetYTitle2D,
double);
645 vtkGetMacro(HorizontalOffsetYTitle2D,
double);
653 vtkSetMacro(SaveTitlePosition,
int);
654 vtkGetMacro(SaveTitlePosition,
int);
662 vtkSetVector3Macro(AxisBaseForX,
double);
663 vtkGetVector3Macro(AxisBaseForX,
double);
671 vtkSetVector3Macro(AxisBaseForY,
double);
672 vtkGetVector3Macro(AxisBaseForY,
double);
680 vtkSetVector3Macro(AxisBaseForZ,
double);
681 vtkGetVector3Macro(AxisBaseForZ,
double);
689 vtkSetMacro(AxisOnOrigin,
bool);
690 vtkGetMacro(AxisOnOrigin,
bool);
698 vtkSetMacro(ScreenSize,
double);
699 vtkGetMacro(ScreenSize,
double);
707 vtkSetMacro(LabelOffset,
double);
708 vtkGetMacro(LabelOffset,
double);
716 vtkSetMacro(ExponentOffset,
double);
717 vtkGetMacro(ExponentOffset,
double);
728 vtkSetVector2Macro(TitleOffset,
double);
729 vtkGetVector2Macro(TitleOffset,
double);
740 void TransformBounds(
vtkViewport*,
double bnds[6]);
753 void BuildTitle(
bool);
759 void BuildExponent(
bool force);
761 void BuildExponent2D(
vtkViewport* viewport,
bool force);
769 vtkViewport* viewport,
double multiplier,
double scenepos[3],
double displayPos[2]);
771 void SetAxisPointsAndLines();
773 bool BuildTickPoints(
double p1[3],
double p2[3],
bool force);
776 void BuildMajorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
779 void BuildMajorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
782 void BuildMinorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
785 void BuildMinorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
787 void BuildAxisGridLines(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
789 bool TickVisibilityChanged();
794 bool BoundsDisplayCoordinateChanged(
vtkViewport* viewport);
800 vtkProp* GetTitleActorInternal();
801 vtkProp* GetLabelActorInternal(
int index);
802 vtkProp* GetExponentActorInternal();
814 void UpdateTitleActorProperty();
815 void UpdateLabelActorProperty(
int idx);
816 void UpdateExponentActorProperty();
827 std::string Exponent;
828 char* LabelFormat =
nullptr;
829 double Range[2] = { 0.0, 1.0 };
830 double LastRange[2] = { -1.0, -1.0 };
831 bool UseTextActor3D =
false;
832 int NumberOfLabelsBuilt = 0;
833 bool MinorTicksVisible =
true;
834 bool LastMinorTicksVisible =
true;
841 int TickLocation = VTK_TICKS_INSIDE;
847 int TitleAlignLocation = VTK_ALIGN_BOTTOM;
853 int ExponentLocation = VTK_ALIGN_POINT2;
855 bool DrawGridlines =
false;
856 bool DrawGridlinesOnly =
false;
857 bool LastDrawGridlines =
false;
858 int DrawGridlinesLocation = 0;
859 int LastDrawGridlinesLocation = 0;
860 double GridlineXLength = 1.0;
861 double GridlineYLength = 1.0;
862 double GridlineZLength = 1.0;
864 bool DrawInnerGridlines =
false;
866 bool DrawGridpolys =
false;
868 bool AxisVisibility =
true;
869 bool TickVisibility =
true;
870 bool LastTickVisibility =
true;
871 bool LabelVisibility =
true;
872 bool TitleVisibility =
true;
873 bool ExponentVisibility =
false;
874 bool LastMajorTickPointCorrection =
false;
877 int AxisType = VTK_AXIS_TYPE_X;
878 int AxisPosition = VTK_AXIS_POS_MINMIN;
881 double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
882 double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
883 double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
885 vtkNew<vtkCoordinate> Point1Coordinate;
886 vtkNew<vtkCoordinate> Point2Coordinate;
888 double MajorTickSize = 1.0;
889 double MinorTickSize = 0.5;
892 double MajorStart[3] = { 0.0, 0.0, 0.0 };
893 double DeltaMajor[3] = { 1.0, 1.0, 1.0 };
896 double MajorRangeStart = 0.0;
897 double MinorRangeStart = 0.0;
902 double DeltaRangeMinor = 1.0;
907 double DeltaRangeMajor = 1.0;
909 int LastAxisPosition = -1;
910 int LastTickLocation = -1;
912 vtkNew<vtkPoints> MinorTickPts;
913 vtkNew<vtkPoints> MajorTickPts;
914 vtkNew<vtkPoints> GridlinePts;
915 vtkNew<vtkPoints> InnerGridlinePts;
916 vtkNew<vtkPoints> GridpolyPts;
918 std::unique_ptr<vtkTextActorInterfaceInternal> TitleProp;
919 vtkSmartPointer<vtkTextProperty> TitleTextProperty;
925 std::unique_ptr<vtkTextActorInterfaceInternal> ExponentProp;
928 std::vector<std::shared_ptr<vtkTextActorInterfaceInternal>> LabelProps;
929 vtkSmartPointer<vtkTextProperty> LabelTextProperty;
932 vtkNew<vtkPolyData> AxisLines;
933 vtkNew<vtkActor> AxisLinesActor;
936 vtkNew<vtkPolyData> AxisMajorTicks, AxisMinorTicks;
937 vtkNew<vtkActor> AxisMajorTicksActor, AxisMinorTicksActor;
939 vtkNew<vtkPolyData> Gridlines;
940 vtkNew<vtkActor> GridlinesActor;
941 vtkNew<vtkPolyData> InnerGridlines;
942 vtkNew<vtkActor> InnerGridlinesActor;
943 vtkNew<vtkPolyData> Gridpolys;
944 vtkNew<vtkActor> GridpolysActor;
946 vtkSmartPointer<vtkCamera>
Camera;
948 vtkTimeStamp BuildTickPointsTime;
949 vtkTimeStamp BoundsTime;
950 vtkTimeStamp LabelBuildTime;
951 vtkTimeStamp TitleTextTime;
952 vtkTimeStamp ExponentTextTime;
954 bool AxisOnOrigin =
false;
956 bool AxisHasZeroLength =
false;
961 bool Use2DMode =
false;
967 double VerticalOffsetXTitle2D = -40;
973 double HorizontalOffsetYTitle2D = -50;
981 int SaveTitlePosition = 0;
986 double TitleConstantPosition[2] = { 0.0, 0.0 };
991 bool NeedBuild2D =
false;
993 double LastMinDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
994 double LastMaxDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
995 double TickVector[3] = { 0.0, 0.0, 0.0 };
1000 double ScreenSize = 10.0;
1006 double LabelOffset = 30.0;
1007 double TitleOffset[2] = { 20.0, 20.0 };
1008 double ExponentOffset = 20.0;
1012VTK_ABI_NAMESPACE_END
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.
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.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Draw the axis.
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 responsible for drawing label text.
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.
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 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.
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.
void SetTickLocationToInside()
void SetLabels(vtkStringArray *labels)
vtkAxisFollower * GetLabelFollower(int index)
Get label actors responsible 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.
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
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
represent and manipulate 3D points
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 geometric object
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.
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_SIZEHINT(...)