72 #ifndef vtkAxisActor_h
73 #define vtkAxisActor_h
78 #include "vtkRenderingAnnotationModule.h"
81 VTK_ABI_NAMESPACE_BEGIN
135 vtkGetVectorMacro(
Range,
double, 2);
144 void SetBounds(
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
153 vtkSetStringMacro(LabelFormat);
154 vtkGetStringMacro(LabelFormat);
165 vtkSetMacro(UseTextActor3D,
bool);
166 vtkGetMacro(UseTextActor3D,
bool);
174 vtkSetMacro(MinorTicksVisible,
bool);
175 vtkGetMacro(MinorTicksVisible,
bool);
176 vtkBooleanMacro(MinorTicksVisible,
bool);
183 void SetTitle(const
char* t);
184 vtkGetStringMacro(Title);
191 void SetExponent(const
char* t);
192 vtkGetStringMacro(Exponent);
200 vtkSetMacro(MajorTickSize,
double);
201 vtkGetMacro(MajorTickSize,
double);
209 vtkSetMacro(MinorTickSize,
double);
210 vtkGetMacro(MinorTickSize,
double);
215 VTK_TICKS_INSIDE = 0,
216 VTK_TICKS_OUTSIDE = 1,
240 vtkSetMacro(AxisVisibility,
bool);
241 vtkGetMacro(AxisVisibility,
bool);
242 vtkBooleanMacro(AxisVisibility,
bool);
250 vtkSetMacro(TickVisibility,
bool);
251 vtkGetMacro(TickVisibility,
bool);
252 vtkBooleanMacro(TickVisibility,
bool);
260 vtkSetMacro(LabelVisibility,
bool);
261 vtkGetMacro(LabelVisibility,
bool);
262 vtkBooleanMacro(LabelVisibility,
bool);
270 vtkSetMacro(TitleVisibility,
bool);
271 vtkGetMacro(TitleVisibility,
bool);
272 vtkBooleanMacro(TitleVisibility,
bool);
280 vtkSetMacro(ExponentVisibility,
bool);
281 vtkGetMacro(ExponentVisibility,
bool);
282 vtkBooleanMacro(ExponentVisibility,
bool);
290 vtkSetMacro(LastMajorTickPointCorrection,
bool);
291 vtkGetMacro(LastMajorTickPointCorrection,
bool);
292 vtkBooleanMacro(LastMajorTickPointCorrection,
bool);
298 VTK_ALIGN_BOTTOM = 1,
299 VTK_ALIGN_POINT1 = 2,
310 vtkGetMacro(TitleAlignLocation,
int);
320 vtkGetMacro(ExponentLocation,
int);
400 vtkSetMacro(DrawGridlines,
bool);
401 vtkGetMacro(DrawGridlines,
bool);
402 vtkBooleanMacro(DrawGridlines,
bool);
412 vtkSetMacro(DrawGridlinesOnly,
bool);
413 vtkGetMacro(DrawGridlinesOnly,
bool);
414 vtkBooleanMacro(DrawGridlinesOnly,
bool);
417 vtkSetMacro(DrawGridlinesLocation,
int);
418 vtkGetMacro(DrawGridlinesLocation,
int);
425 vtkSetMacro(DrawInnerGridlines,
bool);
426 vtkGetMacro(DrawInnerGridlines,
bool);
427 vtkBooleanMacro(DrawInnerGridlines,
bool);
435 vtkSetMacro(GridlineXLength,
double);
436 vtkGetMacro(GridlineXLength,
double);
437 vtkSetMacro(GridlineYLength,
double);
438 vtkGetMacro(GridlineYLength,
double);
439 vtkSetMacro(GridlineZLength,
double);
440 vtkGetMacro(GridlineZLength,
double);
448 vtkSetMacro(DrawGridpolys,
bool);
449 vtkGetMacro(DrawGridpolys,
bool);
450 vtkBooleanMacro(DrawGridpolys,
bool);
465 vtkSetClampMacro(
AxisType,
int, VTK_AXIS_TYPE_X, VTK_AXIS_TYPE_Z);
474 VTK_AXIS_POS_MINMIN = 0,
475 VTK_AXIS_POS_MINMAX = 1,
476 VTK_AXIS_POS_MAXMAX = 2,
477 VTK_AXIS_POS_MAXMIN = 3
485 vtkSetMacro(Log,
bool);
486 vtkGetMacro(Log,
bool);
487 vtkBooleanMacro(Log,
bool);
499 vtkSetClampMacro(
AxisPosition,
int, VTK_AXIS_POS_MINMIN, VTK_AXIS_POS_MAXMIN);
547 vtkSetMacro(MinorStart,
double);
548 vtkGetMacro(MinorStart,
double);
551 vtkSetMacro(DeltaMinor,
double);
552 vtkGetMacro(DeltaMinor,
double);
564 vtkSetMacro(MinorRangeStart,
double);
565 vtkGetMacro(MinorRangeStart,
double);
566 vtkSetMacro(MajorRangeStart,
double);
567 vtkGetMacro(MajorRangeStart,
double);
575 vtkSetMacro(DeltaRangeMinor,
double);
576 vtkGetMacro(DeltaRangeMinor,
double);
577 vtkSetMacro(DeltaRangeMajor,
double);
578 vtkGetMacro(DeltaRangeMajor,
double);
631 vtkGetMacro(NumberOfLabelsBuilt,
int);
639 vtkSetMacro(CalculateTitleOffset,
bool);
640 vtkGetMacro(CalculateTitleOffset,
bool);
641 vtkBooleanMacro(CalculateTitleOffset,
bool);
649 vtkSetMacro(CalculateLabelOffset,
bool);
650 vtkGetMacro(CalculateLabelOffset,
bool);
651 vtkBooleanMacro(CalculateLabelOffset,
bool);
659 vtkSetMacro(Use2DMode,
bool);
660 vtkGetMacro(Use2DMode,
bool);
668 vtkSetMacro(VerticalOffsetXTitle2D,
double);
669 vtkGetMacro(VerticalOffsetXTitle2D,
double);
677 vtkSetMacro(HorizontalOffsetYTitle2D,
double);
678 vtkGetMacro(HorizontalOffsetYTitle2D,
double);
686 vtkSetMacro(SaveTitlePosition,
int);
687 vtkGetMacro(SaveTitlePosition,
int);
695 vtkSetVector3Macro(AxisBaseForX,
double);
696 vtkGetVector3Macro(AxisBaseForX,
double);
704 vtkSetVector3Macro(AxisBaseForY,
double);
705 vtkGetVector3Macro(AxisBaseForY,
double);
713 vtkSetVector3Macro(AxisBaseForZ,
double);
714 vtkGetVector3Macro(AxisBaseForZ,
double);
722 vtkSetMacro(AxisOnOrigin,
bool);
723 vtkGetMacro(AxisOnOrigin,
bool);
731 vtkSetMacro(ScreenSize,
double);
732 vtkGetMacro(ScreenSize,
double);
740 vtkSetMacro(LabelOffset,
double);
741 vtkGetMacro(LabelOffset,
double);
749 vtkSetMacro(ExponentOffset,
double);
750 vtkGetMacro(ExponentOffset,
double);
762 void SetTitleOffset(
double titleOffsetY);
764 double GetTitleOffset();
765 vtkSetVector2Macro(TitleOffset,
double);
767 void GetTitleOffset(
double& titleOffsetX,
double& titleOffsetY);
774 char* Title =
nullptr;
775 char* Exponent =
nullptr;
776 char* LabelFormat =
nullptr;
778 double LastRange[2] = { -1.0, -1.0 };
779 bool UseTextActor3D =
false;
780 int NumberOfLabelsBuilt = 0;
781 bool MinorTicksVisible =
true;
782 bool LastMinorTicksVisible =
true;
795 int TitleAlignLocation = VTK_ALIGN_BOTTOM;
801 int ExponentLocation = VTK_ALIGN_POINT2;
803 bool DrawGridlines =
false;
804 bool DrawGridlinesOnly =
false;
805 bool LastDrawGridlines =
false;
806 int DrawGridlinesLocation = 0;
807 int LastDrawGridlinesLocation = 0;
808 double GridlineXLength = 1.0;
809 double GridlineYLength = 1.0;
810 double GridlineZLength = 1.0;
812 bool DrawInnerGridlines =
false;
813 bool LastDrawInnerGridlines =
false;
815 bool DrawGridpolys =
false;
816 bool LastDrawGridpolys =
false;
818 bool AxisVisibility =
true;
819 bool TickVisibility =
true;
820 bool LastTickVisibility =
true;
821 bool LabelVisibility =
true;
822 bool TitleVisibility =
true;
823 bool ExponentVisibility =
false;
824 bool LastMajorTickPointCorrection =
false;
831 double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
832 double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
833 double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
839 void TransformBounds(
vtkViewport*,
double bnds[6]);
850 void RotateActor2DFromAxisProjection(
vtkTextActor* pActor2D);
868 void BuildTitle(
bool);
874 void BuildExponent(
bool force);
876 void BuildExponent2D(
vtkViewport* viewport,
bool force);
880 void SetAxisPointsAndLines();
882 bool BuildTickPoints(
double p1[3],
double p2[3],
bool force);
885 void BuildMajorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
888 void BuildMajorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
891 void BuildMinorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
894 void BuildMinorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
896 void BuildAxisGridLines(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
898 bool TickVisibilityChanged();
903 bool BoundsDisplayCoordinateChanged(
vtkViewport* viewport);
908 double MajorTickSize = 1.0;
909 double MinorTickSize = 0.5;
912 double MajorStart[3] = { 0.0, 0.0, 0.0 };
913 double DeltaMajor[3] = { 1.0, 1.0, 1.0 };
914 double MinorStart = 0.0;
915 double DeltaMinor = 1.0;
918 double MajorRangeStart = 0.0;
919 double MinorRangeStart = 0.0;
924 double DeltaRangeMinor = 1.0;
929 double DeltaRangeMajor = 1.0;
931 int LastAxisPosition = -1;
932 int LastTickLocation = -1;
996 bool AxisOnOrigin =
false;
998 bool AxisHasZeroLength =
false;
1000 bool CalculateTitleOffset =
false;
1001 bool CalculateLabelOffset =
false;
1006 bool Use2DMode =
false;
1012 double VerticalOffsetXTitle2D = -40;
1018 double HorizontalOffsetYTitle2D = -50;
1026 int SaveTitlePosition = 0;
1031 double TitleConstantPosition[2] = { 0.0, 0.0 };
1036 bool NeedBuild2D =
false;
1038 double LastMinDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1039 double LastMaxDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1040 double TickVector[3] = { 0.0, 0.0, 0.0 };
1045 double ScreenSize = 10.0;
1051 double LabelOffset = 30.0;
1052 double TitleOffset[2] = { 20.0, 20.0 };
1053 double ExponentOffset = 20.0;
1057 VTK_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.
double * GetBounds() override
Set or get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
void SetTickLocationToBoth()
void SetAxisPositionToMinMax()
virtual void SetPoint2(double x, double y, double z)
Specify the position of the second point defining the axis.
virtual vtkCoordinate * GetPoint1Coordinate()
Specify the position of the first 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...
vtkProperty * GetAxisMajorTicksProperty()
Get/Set axis actor property (axis and its ticks)
vtkCamera * GetCamera()
Set/Get the camera for this axis.
void SetAxisMainLineProperty(vtkProperty *)
Get/Set main line axis actor property.
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.
vtkProp3DAxisFollower ** GetLabelProps3D()
Get label actors responsigle for drawing label text.
double ComputeMaxLabelLength(const double[3])
static vtkAxisActor * New()
Instantiate object.
double GetMajorStart(int axis)
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.
virtual vtkCoordinate * GetPoint2Coordinate()
Specify the position of the second point defining the axis.
void SetGridlinesProperty(vtkProperty *)
Get/Set gridlines actor property (outer grid lines)
void SetAxisTypeToZ()
Set/Get the type of this axis.
vtkTextProperty * GetLabelTextProperty()
Set/Get the axis labels text property.
vtkProperty * GetGridlinesProperty()
Get/Set gridlines actor property (outer grid lines)
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.
void SetAxisPositionToMinMin()
double GetDeltaMajor(int axis)
Set/Get the starting position for minor and major tick points, and the delta values that determine th...
vtkProperty * GetInnerGridlinesProperty()
Get/Set inner gridlines actor 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.
virtual double * GetPoint1()
Specify the position of the first point defining the axis.
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)
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.
vtkProperty * GetAxisMinorTicksProperty()
Get/Set axis actor property (axis and its ticks)
void SetAxisTypeToX()
Set/Get the type of this axis.
vtkProperty * GetGridpolysProperty()
Get/Set gridPolys actor property (grid quads)
void SetTitleScale(double scale)
vtkProperty * GetAxisLinesProperty()
Get/Set axis actor property (axis and its ticks) (kept for compatibility)
virtual void SetTitleAlignLocation(int location)
Get/Set the alignment of the title related to the axis.
virtual void SetTitleTextProperty(vtkTextProperty *p)
Set/Get the axis title text property.
double ComputeTitleLength(const double[3])
void SetAxisPositionToMaxMin()
virtual int RenderTranslucentGeometry(vtkViewport *viewport)
Draw the axis.
void SetTickLocationToInside()
void SetLabels(vtkStringArray *labels)
virtual double * GetPoint2()
Specify the position of the second point defining the axis.
vtkAxisFollower ** GetLabelActors()
Get label actors responsigle for drawing label text.
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)
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 * GetAxisMainLineProperty()
Get/Set main line axis actor property.
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
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.
record modification and/or execution time
abstract specification for Viewports
window superclass for vtkRenderWindow
void GetBounds(T a, double bds[6])
auto Range(IterablePtr iterable, Options &&... opts) -> typename detail::IterableTraits< typename detail::StripPointers< IterablePtr >::type >::RangeType
Generate an iterable STL proxy object for a VTK container.
#define VTK_DEPRECATED_IN_9_3_0(reason)
#define VTK_SIZEHINT(...)