50#include "vtkRenderingAnnotationModule.h"
54VTK_ABI_NAMESPACE_BEGIN
87 virtual void SetPoint1(
double x,
double y,
double z);
97 virtual void SetPoint2(
double x,
double y,
double z);
108 vtkGetVectorMacro(
Range,
double, 2);
117 void SetBounds(
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
173 vtkSetMacro(MajorTickSize,
double);
174 vtkGetMacro(MajorTickSize,
double);
182 vtkSetMacro(MinorTickSize,
double);
183 vtkGetMacro(MinorTickSize,
double);
460 vtkBooleanMacro(
Log,
bool);
520 vtkSetMacro(MinorStart,
double);
521 vtkGetMacro(MinorStart,
double);
524 vtkSetMacro(DeltaMinor,
double);
525 vtkGetMacro(DeltaMinor,
double);
537 vtkSetMacro(MinorRangeStart,
double);
538 vtkGetMacro(MinorRangeStart,
double);
539 vtkSetMacro(MajorRangeStart,
double);
540 vtkGetMacro(MajorRangeStart,
double);
548 vtkSetMacro(DeltaRangeMinor,
double);
549 vtkGetMacro(DeltaRangeMinor,
double);
550 vtkSetMacro(DeltaRangeMajor,
double);
551 vtkGetMacro(DeltaRangeMajor,
double);
612 vtkSetMacro(CalculateTitleOffset,
bool);
613 vtkGetMacro(CalculateTitleOffset,
bool);
614 vtkBooleanMacro(CalculateTitleOffset,
bool);
622 vtkSetMacro(CalculateLabelOffset,
bool);
623 vtkGetMacro(CalculateLabelOffset,
bool);
624 vtkBooleanMacro(CalculateLabelOffset,
bool);
632 vtkSetMacro(Use2DMode,
bool);
633 vtkGetMacro(Use2DMode,
bool);
641 vtkSetMacro(VerticalOffsetXTitle2D,
double);
642 vtkGetMacro(VerticalOffsetXTitle2D,
double);
650 vtkSetMacro(HorizontalOffsetYTitle2D,
double);
651 vtkGetMacro(HorizontalOffsetYTitle2D,
double);
659 vtkSetMacro(SaveTitlePosition,
int);
660 vtkGetMacro(SaveTitlePosition,
int);
695 vtkSetMacro(AxisOnOrigin,
bool);
696 vtkGetMacro(AxisOnOrigin,
bool);
704 vtkSetMacro(ScreenSize,
double);
705 vtkGetMacro(ScreenSize,
double);
713 vtkSetMacro(LabelOffset,
double);
714 vtkGetMacro(LabelOffset,
double);
722 vtkSetMacro(ExponentOffset,
double);
723 vtkGetMacro(ExponentOffset,
double);
738 vtkSetVector2Macro(TitleOffset,
double);
812 void TransformBounds(
vtkViewport*,
double bnds[6]);
823 void RotateActor2DFromAxisProjection(
vtkTextActor* pActor2D);
841 void BuildTitle(
bool);
847 void BuildExponent(
bool force);
849 void BuildExponent2D(
vtkViewport* viewport,
bool force);
853 void SetAxisPointsAndLines();
855 bool BuildTickPoints(
double p1[3],
double p2[3],
bool force);
858 void BuildMajorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
861 void BuildMajorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
864 void BuildMinorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
867 void BuildMinorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
869 void BuildAxisGridLines(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
871 bool TickVisibilityChanged();
876 bool BoundsDisplayCoordinateChanged(
vtkViewport* viewport);
881 double MajorTickSize = 1.0;
882 double MinorTickSize = 0.5;
885 double MajorStart[3] = { 0.0, 0.0, 0.0 };
886 double DeltaMajor[3] = { 1.0, 1.0, 1.0 };
887 double MinorStart = 0.0;
888 double DeltaMinor = 1.0;
891 double MajorRangeStart = 0.0;
892 double MinorRangeStart = 0.0;
897 double DeltaRangeMinor = 1.0;
902 double DeltaRangeMajor = 1.0;
904 int LastAxisPosition = -1;
905 int LastTickLocation = -1;
907 vtkNew<vtkPoints> MinorTickPts;
908 vtkNew<vtkPoints> MajorTickPts;
909 vtkNew<vtkPoints> GridlinePts;
910 vtkNew<vtkPoints> InnerGridlinePts;
911 vtkNew<vtkPoints> GridpolyPts;
913 vtkNew<vtkVectorText> TitleVector;
914 vtkNew<vtkPolyDataMapper> TitleMapper;
915 vtkNew<vtkAxisFollower> TitleActor;
916 vtkNew<vtkTextActor> TitleActor2D;
917 vtkNew<vtkProp3DAxisFollower> TitleProp3D;
918 vtkNew<vtkTextActor3D> TitleActor3D;
919 vtkSmartPointer<vtkTextProperty> TitleTextProperty;
925 vtkNew<vtkVectorText> ExponentVector;
926 vtkNew<vtkPolyDataMapper> ExponentMapper;
927 vtkNew<vtkAxisFollower> ExponentActor;
928 vtkNew<vtkTextActor> ExponentActor2D;
929 vtkNew<vtkProp3DAxisFollower> ExponentProp3D;
930 vtkNew<vtkTextActor3D> ExponentActor3D;
933 vtkSmartPointer<vtkVectorText>* LabelVectors =
nullptr;
934 vtkSmartPointer<vtkPolyDataMapper>* LabelMappers =
nullptr;
935 vtkAxisFollower** LabelActors =
nullptr;
936 vtkProp3DAxisFollower** LabelProps3D =
nullptr;
937 vtkSmartPointer<vtkTextActor>* LabelActors2D =
nullptr;
938 vtkSmartPointer<vtkTextActor3D>* LabelActors3D =
nullptr;
939 vtkSmartPointer<vtkTextProperty> LabelTextProperty;
942 vtkNew<vtkPolyData> AxisLines;
943 vtkNew<vtkPolyDataMapper> AxisLinesMapper;
944 vtkNew<vtkActor> AxisLinesActor;
947 vtkNew<vtkPolyData> AxisMajorTicks, AxisMinorTicks;
948 vtkNew<vtkPolyDataMapper> AxisMajorTicksMapper, AxisMinorTicksMapper;
949 vtkNew<vtkActor> AxisMajorTicksActor, AxisMinorTicksActor;
951 vtkNew<vtkPolyData> Gridlines;
952 vtkNew<vtkPolyDataMapper> GridlinesMapper;
953 vtkNew<vtkActor> GridlinesActor;
954 vtkNew<vtkPolyData> InnerGridlines;
955 vtkNew<vtkPolyDataMapper> InnerGridlinesMapper;
956 vtkNew<vtkActor> InnerGridlinesActor;
957 vtkNew<vtkPolyData> Gridpolys;
958 vtkNew<vtkPolyDataMapper> GridpolysMapper;
959 vtkNew<vtkActor> GridpolysActor;
961 vtkSmartPointer<vtkCamera> Camera;
962 vtkTimeStamp BuildTime;
963 vtkTimeStamp BuildTickPointsTime;
964 vtkTimeStamp BoundsTime;
965 vtkTimeStamp LabelBuildTime;
966 vtkTimeStamp TitleTextTime;
967 vtkTimeStamp ExponentTextTime;
969 bool AxisOnOrigin =
false;
971 bool AxisHasZeroLength =
false;
973 bool CalculateTitleOffset =
false;
974 bool CalculateLabelOffset =
false;
979 bool Use2DMode =
false;
985 double VerticalOffsetXTitle2D = -40;
991 double HorizontalOffsetYTitle2D = -50;
999 int SaveTitlePosition = 0;
1004 double TitleConstantPosition[2] = { 0.0, 0.0 };
1009 bool NeedBuild2D =
false;
1011 double LastMinDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1012 double LastMaxDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1013 double TickVector[3] = { 0.0, 0.0, 0.0 };
1018 double ScreenSize = 10.0;
1024 double LabelOffset = 30.0;
1025 double TitleOffset[2] = { 20.0, 20.0 };
1026 double ExponentOffset = 20.0;
1030VTK_ABI_NAMESPACE_END
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()
int LastDrawGridlinesLocation
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.
bool LastMinorTicksVisible
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.
void SetTitle(const char *t)
Set/Get the title of the axis actor.
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()
bool LastMajorTickPointCorrection
bool LastDrawInnerGridlines
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).
void SetTitleOffset(double titleOffsetY)
Set/Get the 2D-offsets used to position title texts.
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.
double GetTitleOffset()
Set/Get the 2D-offsets used to position title texts.
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).
int TitleAlignLocation
Hold the alignment property of the title related to the axis.
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.
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).
int ExponentLocation
Hold the alignment property of the exponent coming from the label values.
void SetAxisTypeToX()
Set/Get the type of this axis.
virtual void SetTickLocation(int)
Set/Get the location of the ticks.
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)
void SetExponent(const char *t)
Set/Get the common exponent of the labels values.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Draw the axis.
int DrawGridlinesLocation
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 subclass of actor that always faces the camera
a simple class to control print indentation
Allocate and hold a VTK object.
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 2D image
represent surface properties of a geometric object
a vtkAbstractArray subclass for strings
An actor that displays text.
An actor that displays text.
represent text properties.
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_DEPRECATED_IN_9_3_0(reason)
#define VTK_SIZEHINT(...)