53 #ifndef vtkAxisActor_h
54 #define vtkAxisActor_h
59 #include "vtkRenderingAnnotationModule.h"
62 VTK_ABI_NAMESPACE_BEGIN
95 virtual void SetPoint1(
double x,
double y,
double z);
116 vtkGetVectorMacro(
Range,
double, 2);
125 void SetBounds(
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
134 vtkSetStringMacro(LabelFormat);
135 vtkGetStringMacro(LabelFormat);
146 vtkSetMacro(UseTextActor3D,
bool);
147 vtkGetMacro(UseTextActor3D,
bool);
155 vtkSetMacro(MinorTicksVisible,
bool);
156 vtkGetMacro(MinorTicksVisible,
bool);
157 vtkBooleanMacro(MinorTicksVisible,
bool);
164 void SetTitle(const
char* t);
165 vtkGetStringMacro(Title);
172 void SetExponent(const
char* t);
173 vtkGetStringMacro(Exponent);
181 vtkSetMacro(MajorTickSize,
double);
182 vtkGetMacro(MajorTickSize,
double);
190 vtkSetMacro(MinorTickSize,
double);
191 vtkGetMacro(MinorTickSize,
double);
196 VTK_TICKS_INSIDE = 0,
197 VTK_TICKS_OUTSIDE = 1,
221 vtkSetMacro(AxisVisibility,
bool);
222 vtkGetMacro(AxisVisibility,
bool);
223 vtkBooleanMacro(AxisVisibility,
bool);
231 vtkSetMacro(TickVisibility,
bool);
232 vtkGetMacro(TickVisibility,
bool);
233 vtkBooleanMacro(TickVisibility,
bool);
241 vtkSetMacro(LabelVisibility,
bool);
242 vtkGetMacro(LabelVisibility,
bool);
243 vtkBooleanMacro(LabelVisibility,
bool);
251 vtkSetMacro(TitleVisibility,
bool);
252 vtkGetMacro(TitleVisibility,
bool);
253 vtkBooleanMacro(TitleVisibility,
bool);
261 vtkSetMacro(ExponentVisibility,
bool);
262 vtkGetMacro(ExponentVisibility,
bool);
263 vtkBooleanMacro(ExponentVisibility,
bool);
271 vtkSetMacro(LastMajorTickPointCorrection,
bool);
272 vtkGetMacro(LastMajorTickPointCorrection,
bool);
273 vtkBooleanMacro(LastMajorTickPointCorrection,
bool);
279 VTK_ALIGN_BOTTOM = 1,
280 VTK_ALIGN_POINT1 = 2,
291 vtkGetMacro(TitleAlignLocation,
int);
301 vtkGetMacro(ExponentLocation,
int);
381 vtkSetMacro(DrawGridlines,
bool);
382 vtkGetMacro(DrawGridlines,
bool);
383 vtkBooleanMacro(DrawGridlines,
bool);
393 vtkSetMacro(DrawGridlinesOnly,
bool);
394 vtkGetMacro(DrawGridlinesOnly,
bool);
395 vtkBooleanMacro(DrawGridlinesOnly,
bool);
398 vtkSetMacro(DrawGridlinesLocation,
int);
399 vtkGetMacro(DrawGridlinesLocation,
int);
406 vtkSetMacro(DrawInnerGridlines,
bool);
407 vtkGetMacro(DrawInnerGridlines,
bool);
408 vtkBooleanMacro(DrawInnerGridlines,
bool);
416 vtkSetMacro(GridlineXLength,
double);
417 vtkGetMacro(GridlineXLength,
double);
418 vtkSetMacro(GridlineYLength,
double);
419 vtkGetMacro(GridlineYLength,
double);
420 vtkSetMacro(GridlineZLength,
double);
421 vtkGetMacro(GridlineZLength,
double);
429 vtkSetMacro(DrawGridpolys,
bool);
430 vtkGetMacro(DrawGridpolys,
bool);
431 vtkBooleanMacro(DrawGridpolys,
bool);
446 vtkSetClampMacro(
AxisType,
int, VTK_AXIS_TYPE_X, VTK_AXIS_TYPE_Z);
455 VTK_AXIS_POS_MINMIN = 0,
456 VTK_AXIS_POS_MINMAX = 1,
457 VTK_AXIS_POS_MAXMAX = 2,
458 VTK_AXIS_POS_MAXMIN = 3
466 vtkSetMacro(Log,
bool);
467 vtkGetMacro(Log,
bool);
468 vtkBooleanMacro(Log,
bool);
480 vtkSetClampMacro(
AxisPosition,
int, VTK_AXIS_POS_MINMIN, VTK_AXIS_POS_MAXMIN);
528 vtkSetMacro(MinorStart,
double);
529 vtkGetMacro(MinorStart,
double);
532 vtkSetMacro(DeltaMinor,
double);
533 vtkGetMacro(DeltaMinor,
double);
545 vtkSetMacro(MinorRangeStart,
double);
546 vtkGetMacro(MinorRangeStart,
double);
547 vtkSetMacro(MajorRangeStart,
double);
548 vtkGetMacro(MajorRangeStart,
double);
556 vtkSetMacro(DeltaRangeMinor,
double);
557 vtkGetMacro(DeltaRangeMinor,
double);
558 vtkSetMacro(DeltaRangeMajor,
double);
559 vtkGetMacro(DeltaRangeMajor,
double);
612 vtkGetMacro(NumberOfLabelsBuilt,
int);
620 vtkSetMacro(CalculateTitleOffset,
bool);
621 vtkGetMacro(CalculateTitleOffset,
bool);
622 vtkBooleanMacro(CalculateTitleOffset,
bool);
630 vtkSetMacro(CalculateLabelOffset,
bool);
631 vtkGetMacro(CalculateLabelOffset,
bool);
632 vtkBooleanMacro(CalculateLabelOffset,
bool);
640 vtkSetMacro(Use2DMode,
bool);
641 vtkGetMacro(Use2DMode,
bool);
649 vtkSetMacro(VerticalOffsetXTitle2D,
double);
650 vtkGetMacro(VerticalOffsetXTitle2D,
double);
658 vtkSetMacro(HorizontalOffsetYTitle2D,
double);
659 vtkGetMacro(HorizontalOffsetYTitle2D,
double);
667 vtkSetMacro(SaveTitlePosition,
int);
668 vtkGetMacro(SaveTitlePosition,
int);
676 vtkSetVector3Macro(AxisBaseForX,
double);
677 vtkGetVector3Macro(AxisBaseForX,
double);
685 vtkSetVector3Macro(AxisBaseForY,
double);
686 vtkGetVector3Macro(AxisBaseForY,
double);
694 vtkSetVector3Macro(AxisBaseForZ,
double);
695 vtkGetVector3Macro(AxisBaseForZ,
double);
703 vtkSetMacro(AxisOnOrigin,
bool);
704 vtkGetMacro(AxisOnOrigin,
bool);
712 vtkSetMacro(ScreenSize,
double);
713 vtkGetMacro(ScreenSize,
double);
721 vtkSetMacro(LabelOffset,
double);
722 vtkGetMacro(LabelOffset,
double);
730 vtkSetMacro(ExponentOffset,
double);
731 vtkGetMacro(ExponentOffset,
double);
743 void SetTitleOffset(
double titleOffsetY);
745 double GetTitleOffset();
746 vtkSetVector2Macro(TitleOffset,
double);
748 void GetTitleOffset(
double& titleOffsetX,
double& titleOffsetY);
755 char* Title =
nullptr;
756 char* Exponent =
nullptr;
757 char* LabelFormat =
nullptr;
759 double LastRange[2] = { -1.0, -1.0 };
760 bool UseTextActor3D =
false;
761 int NumberOfLabelsBuilt = 0;
762 bool MinorTicksVisible =
true;
763 bool LastMinorTicksVisible =
true;
776 int TitleAlignLocation = VTK_ALIGN_BOTTOM;
782 int ExponentLocation = VTK_ALIGN_POINT2;
784 bool DrawGridlines =
false;
785 bool DrawGridlinesOnly =
false;
786 bool LastDrawGridlines =
false;
787 int DrawGridlinesLocation = 0;
788 int LastDrawGridlinesLocation = 0;
789 double GridlineXLength = 1.0;
790 double GridlineYLength = 1.0;
791 double GridlineZLength = 1.0;
793 bool DrawInnerGridlines =
false;
794 bool LastDrawInnerGridlines =
false;
796 bool DrawGridpolys =
false;
797 bool LastDrawGridpolys =
false;
799 bool AxisVisibility =
true;
800 bool TickVisibility =
true;
801 bool LastTickVisibility =
true;
802 bool LabelVisibility =
true;
803 bool TitleVisibility =
true;
804 bool ExponentVisibility =
false;
805 bool LastMajorTickPointCorrection =
false;
812 double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
813 double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
814 double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
820 void TransformBounds(
vtkViewport*,
double bnds[6]);
831 void RotateActor2DFromAxisProjection(
vtkTextActor* pActor2D);
849 void BuildTitle(
bool);
855 void BuildExponent(
bool force);
857 void BuildExponent2D(
vtkViewport* viewport,
bool force);
861 void SetAxisPointsAndLines();
863 bool BuildTickPoints(
double p1[3],
double p2[3],
bool force);
866 void BuildMajorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
869 void BuildMajorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
872 void BuildMinorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
875 void BuildMinorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
877 void BuildAxisGridLines(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
879 bool TickVisibilityChanged();
884 bool BoundsDisplayCoordinateChanged(
vtkViewport* viewport);
889 double MajorTickSize = 1.0;
890 double MinorTickSize = 0.5;
893 double MajorStart[3] = { 0.0, 0.0, 0.0 };
894 double DeltaMajor[3] = { 1.0, 1.0, 1.0 };
895 double MinorStart = 0.0;
896 double DeltaMinor = 1.0;
899 double MajorRangeStart = 0.0;
900 double MinorRangeStart = 0.0;
905 double DeltaRangeMinor = 1.0;
910 double DeltaRangeMajor = 1.0;
912 int LastAxisPosition = -1;
913 int LastTickLocation = -1;
977 bool AxisOnOrigin =
false;
979 bool AxisHasZeroLength =
false;
981 bool CalculateTitleOffset =
false;
982 bool CalculateLabelOffset =
false;
987 bool Use2DMode =
false;
993 double VerticalOffsetXTitle2D = -40;
999 double HorizontalOffsetYTitle2D = -50;
1007 int SaveTitlePosition = 0;
1012 double TitleConstantPosition[2] = { 0.0, 0.0 };
1017 bool NeedBuild2D =
false;
1019 double LastMinDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1020 double LastMaxDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1021 double TickVector[3] = { 0.0, 0.0, 0.0 };
1026 double ScreenSize = 10.0;
1032 double LabelOffset = 30.0;
1033 double TitleOffset[2] = { 20.0, 20.0 };
1034 double ExponentOffset = 20.0;
1038 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(...)