50#include "vtkRenderingAnnotationModule.h"
53VTK_ABI_NAMESPACE_BEGIN
86 virtual void SetPoint1(
double x,
double y,
double z);
96 virtual void SetPoint2(
double x,
double y,
double z);
106 vtkSetVector2Macro(Range,
double);
107 vtkGetVectorMacro(Range,
double, 2);
116 void SetBounds(
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
118 void GetBounds(
double bounds[6]);
125 vtkSetStringMacro(LabelFormat);
126 vtkGetStringMacro(LabelFormat);
137 vtkSetMacro(UseTextActor3D,
bool);
138 vtkGetMacro(UseTextActor3D,
bool);
146 vtkSetMacro(MinorTicksVisible,
bool);
147 vtkGetMacro(MinorTicksVisible,
bool);
148 vtkBooleanMacro(MinorTicksVisible,
bool);
155 void SetTitle(const
char* t);
156 vtkGetStringMacro(Title);
163 void SetExponent(const
char* t);
164 vtkGetStringMacro(Exponent);
172 vtkSetMacro(MajorTickSize,
double);
173 vtkGetMacro(MajorTickSize,
double);
181 vtkSetMacro(MinorTickSize,
double);
182 vtkGetMacro(MinorTickSize,
double);
187 VTK_TICKS_INSIDE = 0,
188 VTK_TICKS_OUTSIDE = 1,
212 vtkSetMacro(AxisVisibility,
bool);
213 vtkGetMacro(AxisVisibility,
bool);
214 vtkBooleanMacro(AxisVisibility,
bool);
222 vtkSetMacro(TickVisibility,
bool);
223 vtkGetMacro(TickVisibility,
bool);
224 vtkBooleanMacro(TickVisibility,
bool);
232 vtkSetMacro(LabelVisibility,
bool);
233 vtkGetMacro(LabelVisibility,
bool);
234 vtkBooleanMacro(LabelVisibility,
bool);
242 vtkSetMacro(TitleVisibility,
bool);
243 vtkGetMacro(TitleVisibility,
bool);
244 vtkBooleanMacro(TitleVisibility,
bool);
252 vtkSetMacro(ExponentVisibility,
bool);
253 vtkGetMacro(ExponentVisibility,
bool);
254 vtkBooleanMacro(ExponentVisibility,
bool);
262 vtkSetMacro(LastMajorTickPointCorrection,
bool);
263 vtkGetMacro(LastMajorTickPointCorrection,
bool);
264 vtkBooleanMacro(LastMajorTickPointCorrection,
bool);
270 VTK_ALIGN_BOTTOM = 1,
271 VTK_ALIGN_POINT1 = 2,
282 vtkGetMacro(TitleAlignLocation,
int);
292 vtkGetMacro(ExponentLocation,
int);
372 vtkSetMacro(DrawGridlines,
bool);
373 vtkGetMacro(DrawGridlines,
bool);
374 vtkBooleanMacro(DrawGridlines,
bool);
384 vtkSetMacro(DrawGridlinesOnly,
bool);
385 vtkGetMacro(DrawGridlinesOnly,
bool);
386 vtkBooleanMacro(DrawGridlinesOnly,
bool);
389 vtkSetMacro(DrawGridlinesLocation,
int);
390 vtkGetMacro(DrawGridlinesLocation,
int);
397 vtkSetMacro(DrawInnerGridlines,
bool);
398 vtkGetMacro(DrawInnerGridlines,
bool);
399 vtkBooleanMacro(DrawInnerGridlines,
bool);
407 vtkSetMacro(GridlineXLength,
double);
408 vtkGetMacro(GridlineXLength,
double);
409 vtkSetMacro(GridlineYLength,
double);
410 vtkGetMacro(GridlineYLength,
double);
411 vtkSetMacro(GridlineZLength,
double);
412 vtkGetMacro(GridlineZLength,
double);
420 vtkSetMacro(DrawGridpolys,
bool);
421 vtkGetMacro(DrawGridpolys,
bool);
422 vtkBooleanMacro(DrawGridpolys,
bool);
437 vtkSetClampMacro(
AxisType,
int, VTK_AXIS_TYPE_X, VTK_AXIS_TYPE_Z);
446 VTK_AXIS_POS_MINMIN = 0,
447 VTK_AXIS_POS_MINMAX = 1,
448 VTK_AXIS_POS_MAXMAX = 2,
449 VTK_AXIS_POS_MAXMIN = 3
457 vtkSetMacro(Log,
bool);
458 vtkGetMacro(Log,
bool);
459 vtkBooleanMacro(Log,
bool);
471 vtkSetClampMacro(
AxisPosition,
int, VTK_AXIS_POS_MINMIN, VTK_AXIS_POS_MAXMIN);
519 vtkSetMacro(MinorStart,
double);
520 vtkGetMacro(MinorStart,
double);
523 vtkSetMacro(DeltaMinor,
double);
524 vtkGetMacro(DeltaMinor,
double);
536 vtkSetMacro(MinorRangeStart,
double);
537 vtkGetMacro(MinorRangeStart,
double);
538 vtkSetMacro(MajorRangeStart,
double);
539 vtkGetMacro(MajorRangeStart,
double);
547 vtkSetMacro(DeltaRangeMinor,
double);
548 vtkGetMacro(DeltaRangeMinor,
double);
549 vtkSetMacro(DeltaRangeMajor,
double);
550 vtkGetMacro(DeltaRangeMajor,
double);
603 vtkGetMacro(NumberOfLabelsBuilt,
int);
611 vtkSetMacro(CalculateTitleOffset,
bool);
612 vtkGetMacro(CalculateTitleOffset,
bool);
613 vtkBooleanMacro(CalculateTitleOffset,
bool);
621 vtkSetMacro(CalculateLabelOffset,
bool);
622 vtkGetMacro(CalculateLabelOffset,
bool);
623 vtkBooleanMacro(CalculateLabelOffset,
bool);
631 vtkSetMacro(Use2DMode,
bool);
632 vtkGetMacro(Use2DMode,
bool);
640 vtkSetMacro(VerticalOffsetXTitle2D,
double);
641 vtkGetMacro(VerticalOffsetXTitle2D,
double);
649 vtkSetMacro(HorizontalOffsetYTitle2D,
double);
650 vtkGetMacro(HorizontalOffsetYTitle2D,
double);
658 vtkSetMacro(SaveTitlePosition,
int);
659 vtkGetMacro(SaveTitlePosition,
int);
667 vtkSetVector3Macro(AxisBaseForX,
double);
668 vtkGetVector3Macro(AxisBaseForX,
double);
676 vtkSetVector3Macro(AxisBaseForY,
double);
677 vtkGetVector3Macro(AxisBaseForY,
double);
685 vtkSetVector3Macro(AxisBaseForZ,
double);
686 vtkGetVector3Macro(AxisBaseForZ,
double);
694 vtkSetMacro(AxisOnOrigin,
bool);
695 vtkGetMacro(AxisOnOrigin,
bool);
703 vtkSetMacro(ScreenSize,
double);
704 vtkGetMacro(ScreenSize,
double);
712 vtkSetMacro(LabelOffset,
double);
713 vtkGetMacro(LabelOffset,
double);
721 vtkSetMacro(ExponentOffset,
double);
722 vtkGetMacro(ExponentOffset,
double);
734 void SetTitleOffset(
double titleOffsetY);
736 double GetTitleOffset();
737 vtkSetVector2Macro(TitleOffset,
double);
739 void GetTitleOffset(
double& titleOffsetX,
double& titleOffsetY);
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;
767 int TitleAlignLocation = VTK_ALIGN_BOTTOM;
773 int ExponentLocation = VTK_ALIGN_POINT2;
775 bool DrawGridlines =
false;
776 bool DrawGridlinesOnly =
false;
777 bool LastDrawGridlines =
false;
778 int DrawGridlinesLocation = 0;
779 int LastDrawGridlinesLocation = 0;
780 double GridlineXLength = 1.0;
781 double GridlineYLength = 1.0;
782 double GridlineZLength = 1.0;
784 bool DrawInnerGridlines =
false;
785 bool LastDrawInnerGridlines =
false;
787 bool DrawGridpolys =
false;
788 bool LastDrawGridpolys =
false;
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;
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 };
811 void TransformBounds(
vtkViewport*,
double bnds[6]);
822 void RotateActor2DFromAxisProjection(
vtkTextActor* pActor2D);
840 void BuildTitle(
bool);
846 void BuildExponent(
bool force);
848 void BuildExponent2D(
vtkViewport* viewport,
bool force);
852 void SetAxisPointsAndLines();
854 bool BuildTickPoints(
double p1[3],
double p2[3],
bool force);
857 void BuildMajorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
860 void BuildMajorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
863 void BuildMinorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
866 void BuildMinorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
868 void BuildAxisGridLines(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
870 bool TickVisibilityChanged();
875 bool BoundsDisplayCoordinateChanged(
vtkViewport* viewport);
880 double MajorTickSize = 1.0;
881 double MinorTickSize = 0.5;
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;
890 double MajorRangeStart = 0.0;
891 double MinorRangeStart = 0.0;
896 double DeltaRangeMinor = 1.0;
901 double DeltaRangeMajor = 1.0;
903 int LastAxisPosition = -1;
904 int LastTickLocation = -1;
968 bool AxisOnOrigin =
false;
970 bool AxisHasZeroLength =
false;
972 bool CalculateTitleOffset =
false;
973 bool CalculateLabelOffset =
false;
978 bool Use2DMode =
false;
984 double VerticalOffsetXTitle2D = -40;
990 double HorizontalOffsetYTitle2D = -50;
998 int SaveTitlePosition = 0;
1003 double TitleConstantPosition[2] = { 0.0, 0.0 };
1008 bool NeedBuild2D =
false;
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 };
1017 double ScreenSize = 10.0;
1023 double LabelOffset = 30.0;
1024 double TitleOffset[2] = { 20.0, 20.0 };
1025 double ExponentOffset = 20.0;
1029VTK_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.
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
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
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
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_DEPRECATED_IN_9_3_0(reason)
#define VTK_SIZEHINT(...)