69#include "vtkRenderingAnnotationModule.h"
76VTK_ABI_NAMESPACE_BEGIN
128 vtkSetVector2Macro(Range,
double);
129 vtkGetVectorMacro(Range,
double, 2);
138 void SetBounds(
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
140 void GetBounds(
double bounds[6]);
147 vtkSetStringMacro(LabelFormat);
148 vtkGetStringMacro(LabelFormat);
159 vtkSetMacro(UseTextActor3D,
bool);
160 vtkGetMacro(UseTextActor3D,
bool);
168 vtkSetMacro(MinorTicksVisible,
bool);
169 vtkGetMacro(MinorTicksVisible,
bool);
170 vtkBooleanMacro(MinorTicksVisible,
bool);
177 void SetTitle(const
std::
string& title);
178 vtkGetMacro(Title,
std::
string);
185 void SetExponent(const
std::
string& exp);
186 vtkGetMacro(Exponent,
std::
string);
194 vtkSetMacro(MajorTickSize,
double);
195 vtkGetMacro(MajorTickSize,
double);
203 vtkSetMacro(MinorTickSize,
double);
204 vtkGetMacro(MinorTickSize,
double);
209 VTK_TICKS_INSIDE = 0,
210 VTK_TICKS_OUTSIDE = 1,
234 vtkSetMacro(AxisVisibility,
bool);
235 vtkGetMacro(AxisVisibility,
bool);
236 vtkBooleanMacro(AxisVisibility,
bool);
244 vtkSetMacro(TickVisibility,
bool);
245 vtkGetMacro(TickVisibility,
bool);
246 vtkBooleanMacro(TickVisibility,
bool);
254 vtkSetMacro(LabelVisibility,
bool);
255 vtkGetMacro(LabelVisibility,
bool);
256 vtkBooleanMacro(LabelVisibility,
bool);
264 vtkSetMacro(TitleVisibility,
bool);
265 vtkGetMacro(TitleVisibility,
bool);
266 vtkBooleanMacro(TitleVisibility,
bool);
274 vtkSetMacro(ExponentVisibility,
bool);
275 vtkGetMacro(ExponentVisibility,
bool);
276 vtkBooleanMacro(ExponentVisibility,
bool);
284 vtkSetMacro(LastMajorTickPointCorrection,
bool);
285 vtkGetMacro(LastMajorTickPointCorrection,
bool);
286 vtkBooleanMacro(LastMajorTickPointCorrection,
bool);
292 VTK_ALIGN_BOTTOM = 1,
293 VTK_ALIGN_POINT1 = 2,
304 vtkGetMacro(TitleAlignLocation,
int);
314 vtkGetMacro(ExponentLocation,
int);
394 vtkSetMacro(DrawGridlines,
bool);
395 vtkGetMacro(DrawGridlines,
bool);
396 vtkBooleanMacro(DrawGridlines,
bool);
406 vtkSetMacro(DrawGridlinesOnly,
bool);
407 vtkGetMacro(DrawGridlinesOnly,
bool);
408 vtkBooleanMacro(DrawGridlinesOnly,
bool);
411 vtkSetMacro(DrawGridlinesLocation,
int);
412 vtkGetMacro(DrawGridlinesLocation,
int);
419 vtkSetMacro(DrawInnerGridlines,
bool);
420 vtkGetMacro(DrawInnerGridlines,
bool);
421 vtkBooleanMacro(DrawInnerGridlines,
bool);
429 vtkSetMacro(GridlineXLength,
double);
430 vtkGetMacro(GridlineXLength,
double);
431 vtkSetMacro(GridlineYLength,
double);
432 vtkGetMacro(GridlineYLength,
double);
433 vtkSetMacro(GridlineZLength,
double);
434 vtkGetMacro(GridlineZLength,
double);
442 vtkSetMacro(DrawGridpolys,
bool);
443 vtkGetMacro(DrawGridpolys,
bool);
444 vtkBooleanMacro(DrawGridpolys,
bool);
459 vtkSetClampMacro(
AxisType,
int, VTK_AXIS_TYPE_X, VTK_AXIS_TYPE_Z);
468 VTK_AXIS_POS_MINMIN = 0,
469 VTK_AXIS_POS_MINMAX = 1,
470 VTK_AXIS_POS_MAXMAX = 2,
471 VTK_AXIS_POS_MAXMIN = 3
479 vtkSetMacro(Log,
bool);
480 vtkGetMacro(Log,
bool);
481 vtkBooleanMacro(Log,
bool);
493 vtkSetClampMacro(
AxisPosition,
int, VTK_AXIS_POS_MINMIN, VTK_AXIS_POS_MAXMIN);
586 vtkSetMacro(MinorRangeStart,
double);
587 vtkGetMacro(MinorRangeStart,
double);
588 vtkSetMacro(MajorRangeStart,
double);
589 vtkGetMacro(MajorRangeStart,
double);
597 vtkSetMacro(DeltaRangeMinor,
double);
598 vtkGetMacro(DeltaRangeMinor,
double);
599 vtkSetMacro(DeltaRangeMajor,
double);
600 vtkGetMacro(DeltaRangeMajor,
double);
625 int GetNumberOfLabelFollowers() {
return this->GetNumberOfLabelsBuilt(); }
643 int GetNumberOfLabelFollower3D() {
return this->GetNumberOfLabelsBuilt(); }
659 vtkGetMacro(NumberOfLabelsBuilt,
int);
689 vtkSetMacro(Use2DMode,
bool);
690 vtkGetMacro(Use2DMode,
bool);
698 vtkSetMacro(VerticalOffsetXTitle2D,
double);
699 vtkGetMacro(VerticalOffsetXTitle2D,
double);
707 vtkSetMacro(HorizontalOffsetYTitle2D,
double);
708 vtkGetMacro(HorizontalOffsetYTitle2D,
double);
716 vtkSetMacro(SaveTitlePosition,
int);
717 vtkGetMacro(SaveTitlePosition,
int);
725 vtkSetVector3Macro(AxisBaseForX,
double);
726 vtkGetVector3Macro(AxisBaseForX,
double);
734 vtkSetVector3Macro(AxisBaseForY,
double);
735 vtkGetVector3Macro(AxisBaseForY,
double);
743 vtkSetVector3Macro(AxisBaseForZ,
double);
744 vtkGetVector3Macro(AxisBaseForZ,
double);
752 vtkSetMacro(AxisOnOrigin,
bool);
753 vtkGetMacro(AxisOnOrigin,
bool);
761 vtkSetMacro(ScreenSize,
double);
762 vtkGetMacro(ScreenSize,
double);
770 vtkSetMacro(LabelOffset,
double);
771 vtkGetMacro(LabelOffset,
double);
779 vtkSetMacro(ExponentOffset,
double);
780 vtkGetMacro(ExponentOffset,
double);
791 vtkSetVector2Macro(TitleOffset,
double);
792 vtkGetVector2Macro(TitleOffset,
double);
803 void TransformBounds(
vtkViewport*,
double bnds[6]);
816 void BuildTitle(
bool);
822 void BuildExponent(
bool force);
824 void BuildExponent2D(
vtkViewport* viewport,
bool force);
832 vtkViewport* viewport,
double multiplier,
double scenepos[3],
double displayPos[2]);
834 void SetAxisPointsAndLines();
836 bool BuildTickPoints(
double p1[3],
double p2[3],
bool force);
839 void BuildMajorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
842 void BuildMajorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
845 void BuildMinorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
848 void BuildMinorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
850 void BuildAxisGridLines(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
852 bool TickVisibilityChanged();
857 bool BoundsDisplayCoordinateChanged(
vtkViewport* viewport);
863 vtkProp* GetTitleActorInternal();
864 vtkProp* GetLabelActorInternal(
int index);
865 vtkProp* GetExponentActorInternal();
877 void UpdateTitleActorProperty();
878 void UpdateLabelActorProperty(
int idx);
879 void UpdateExponentActorProperty();
883 std::string Exponent;
884 char* LabelFormat =
nullptr;
885 double Range[2] = { 0.0, 1.0 };
886 double LastRange[2] = { -1.0, -1.0 };
887 bool UseTextActor3D =
false;
888 int NumberOfLabelsBuilt = 0;
889 bool MinorTicksVisible =
true;
890 bool LastMinorTicksVisible =
true;
897 int TickLocation = VTK_TICKS_INSIDE;
903 int TitleAlignLocation = VTK_ALIGN_BOTTOM;
909 int ExponentLocation = VTK_ALIGN_POINT2;
911 bool DrawGridlines =
false;
912 bool DrawGridlinesOnly =
false;
913 bool LastDrawGridlines =
false;
914 int DrawGridlinesLocation = 0;
915 int LastDrawGridlinesLocation = 0;
916 double GridlineXLength = 1.0;
917 double GridlineYLength = 1.0;
918 double GridlineZLength = 1.0;
920 bool DrawInnerGridlines =
false;
922 bool DrawGridpolys =
false;
924 bool AxisVisibility =
true;
925 bool TickVisibility =
true;
926 bool LastTickVisibility =
true;
927 bool LabelVisibility =
true;
928 bool TitleVisibility =
true;
929 bool ExponentVisibility =
false;
930 bool LastMajorTickPointCorrection =
false;
933 int AxisType = VTK_AXIS_TYPE_X;
934 int AxisPosition = VTK_AXIS_POS_MINMIN;
937 double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
938 double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
939 double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
944 double MajorTickSize = 1.0;
945 double MinorTickSize = 0.5;
948 double MajorStart[3] = { 0.0, 0.0, 0.0 };
949 double DeltaMajor[3] = { 1.0, 1.0, 1.0 };
952 double MajorRangeStart = 0.0;
953 double MinorRangeStart = 0.0;
958 double DeltaRangeMinor = 1.0;
963 double DeltaRangeMajor = 1.0;
965 int LastAxisPosition = -1;
966 int LastTickLocation = -1;
974 std::unique_ptr<vtkTextActorInterfaceInternal> TitleProp;
981 std::unique_ptr<vtkTextActorInterfaceInternal> ExponentProp;
984 std::vector<std::shared_ptr<vtkTextActorInterfaceInternal>> LabelProps;
988 std::vector<vtkAxisFollower*> LabelActors;
990 std::vector<vtkProp3DAxisFollower*> LabelProps3D;
1015 bool AxisOnOrigin =
false;
1017 bool AxisHasZeroLength =
false;
1019 bool CalculateTitleOffset =
false;
1020 bool CalculateLabelOffset =
false;
1025 bool Use2DMode =
false;
1031 double VerticalOffsetXTitle2D = -40;
1037 double HorizontalOffsetYTitle2D = -50;
1045 int SaveTitlePosition = 0;
1050 double TitleConstantPosition[2] = { 0.0, 0.0 };
1055 bool NeedBuild2D =
false;
1057 double LastMinDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1058 double LastMaxDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1059 double TickVector[3] = { 0.0, 0.0, 0.0 };
1064 double ScreenSize = 10.0;
1070 double LabelOffset = 30.0;
1071 double TitleOffset[2] = { 20.0, 20.0 };
1072 double ExponentOffset = 20.0;
1076VTK_ABI_NAMESPACE_END
represents an object (geometry & properties) in a rendered scene
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.
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.
double ComputeMaxLabelLength(const double[3])
Compute the max diagonal lentgh of the labels.
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.
double ComputeMaxLabelLength()
Compute the max diagonal lentgh of the labels.
vtkProperty * GetGridpolysProperty()
Get/Set gridPolys actor property (grid quads)
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...
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.
void SetAxisTypeToX()
Set/Get the type of this axis.
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.
void SetTickLocationToInside()
void SetLabels(vtkStringArray *labels)
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
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...
abstract superclass for all actors, volumes and annotations
represent surface properties of a geometric object
Hold a reference to a vtkObjectBase instance.
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.
record modification and/or execution time
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_DEPRECATED_IN_9_5_0(reason)
#define VTK_SIZEHINT(...)