68#include "vtkRenderingAnnotationModule.h"
72VTK_ABI_NAMESPACE_BEGIN
125 vtkSetVector2Macro(Range,
double);
126 vtkGetVectorMacro(Range,
double, 2);
135 void SetBounds(
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
137 void GetBounds(
double bounds[6]);
144 vtkSetStringMacro(LabelFormat);
145 vtkGetStringMacro(LabelFormat);
156 vtkSetMacro(UseTextActor3D,
bool);
157 vtkGetMacro(UseTextActor3D,
bool);
165 vtkSetMacro(MinorTicksVisible,
bool);
166 vtkGetMacro(MinorTicksVisible,
bool);
167 vtkBooleanMacro(MinorTicksVisible,
bool);
174 void SetTitle(const
char* t);
175 vtkGetStringMacro(Title);
182 void SetExponent(const
char* t);
183 vtkGetStringMacro(Exponent);
191 vtkSetMacro(MajorTickSize,
double);
192 vtkGetMacro(MajorTickSize,
double);
200 vtkSetMacro(MinorTickSize,
double);
201 vtkGetMacro(MinorTickSize,
double);
206 VTK_TICKS_INSIDE = 0,
207 VTK_TICKS_OUTSIDE = 1,
231 vtkSetMacro(AxisVisibility,
bool);
232 vtkGetMacro(AxisVisibility,
bool);
233 vtkBooleanMacro(AxisVisibility,
bool);
241 vtkSetMacro(TickVisibility,
bool);
242 vtkGetMacro(TickVisibility,
bool);
243 vtkBooleanMacro(TickVisibility,
bool);
251 vtkSetMacro(LabelVisibility,
bool);
252 vtkGetMacro(LabelVisibility,
bool);
253 vtkBooleanMacro(LabelVisibility,
bool);
261 vtkSetMacro(TitleVisibility,
bool);
262 vtkGetMacro(TitleVisibility,
bool);
263 vtkBooleanMacro(TitleVisibility,
bool);
271 vtkSetMacro(ExponentVisibility,
bool);
272 vtkGetMacro(ExponentVisibility,
bool);
273 vtkBooleanMacro(ExponentVisibility,
bool);
281 vtkSetMacro(LastMajorTickPointCorrection,
bool);
282 vtkGetMacro(LastMajorTickPointCorrection,
bool);
283 vtkBooleanMacro(LastMajorTickPointCorrection,
bool);
289 VTK_ALIGN_BOTTOM = 1,
290 VTK_ALIGN_POINT1 = 2,
301 vtkGetMacro(TitleAlignLocation,
int);
311 vtkGetMacro(ExponentLocation,
int);
391 vtkSetMacro(DrawGridlines,
bool);
392 vtkGetMacro(DrawGridlines,
bool);
393 vtkBooleanMacro(DrawGridlines,
bool);
403 vtkSetMacro(DrawGridlinesOnly,
bool);
404 vtkGetMacro(DrawGridlinesOnly,
bool);
405 vtkBooleanMacro(DrawGridlinesOnly,
bool);
408 vtkSetMacro(DrawGridlinesLocation,
int);
409 vtkGetMacro(DrawGridlinesLocation,
int);
416 vtkSetMacro(DrawInnerGridlines,
bool);
417 vtkGetMacro(DrawInnerGridlines,
bool);
418 vtkBooleanMacro(DrawInnerGridlines,
bool);
426 vtkSetMacro(GridlineXLength,
double);
427 vtkGetMacro(GridlineXLength,
double);
428 vtkSetMacro(GridlineYLength,
double);
429 vtkGetMacro(GridlineYLength,
double);
430 vtkSetMacro(GridlineZLength,
double);
431 vtkGetMacro(GridlineZLength,
double);
439 vtkSetMacro(DrawGridpolys,
bool);
440 vtkGetMacro(DrawGridpolys,
bool);
441 vtkBooleanMacro(DrawGridpolys,
bool);
456 vtkSetClampMacro(
AxisType,
int, VTK_AXIS_TYPE_X, VTK_AXIS_TYPE_Z);
465 VTK_AXIS_POS_MINMIN = 0,
466 VTK_AXIS_POS_MINMAX = 1,
467 VTK_AXIS_POS_MAXMAX = 2,
468 VTK_AXIS_POS_MAXMIN = 3
476 vtkSetMacro(Log,
bool);
477 vtkGetMacro(Log,
bool);
478 vtkBooleanMacro(Log,
bool);
490 vtkSetClampMacro(
AxisPosition,
int, VTK_AXIS_POS_MINMIN, VTK_AXIS_POS_MAXMIN);
538 vtkSetMacro(MinorStart,
double);
539 vtkGetMacro(MinorStart,
double);
542 vtkSetMacro(DeltaMinor,
double);
543 vtkGetMacro(DeltaMinor,
double);
555 vtkSetMacro(MinorRangeStart,
double);
556 vtkGetMacro(MinorRangeStart,
double);
557 vtkSetMacro(MajorRangeStart,
double);
558 vtkGetMacro(MajorRangeStart,
double);
566 vtkSetMacro(DeltaRangeMinor,
double);
567 vtkGetMacro(DeltaRangeMinor,
double);
568 vtkSetMacro(DeltaRangeMajor,
double);
569 vtkGetMacro(DeltaRangeMajor,
double);
622 vtkGetMacro(NumberOfLabelsBuilt,
int);
630 vtkSetMacro(CalculateTitleOffset,
bool);
631 vtkGetMacro(CalculateTitleOffset,
bool);
632 vtkBooleanMacro(CalculateTitleOffset,
bool);
640 vtkSetMacro(CalculateLabelOffset,
bool);
641 vtkGetMacro(CalculateLabelOffset,
bool);
642 vtkBooleanMacro(CalculateLabelOffset,
bool);
650 vtkSetMacro(Use2DMode,
bool);
651 vtkGetMacro(Use2DMode,
bool);
659 vtkSetMacro(VerticalOffsetXTitle2D,
double);
660 vtkGetMacro(VerticalOffsetXTitle2D,
double);
668 vtkSetMacro(HorizontalOffsetYTitle2D,
double);
669 vtkGetMacro(HorizontalOffsetYTitle2D,
double);
677 vtkSetMacro(SaveTitlePosition,
int);
678 vtkGetMacro(SaveTitlePosition,
int);
686 vtkSetVector3Macro(AxisBaseForX,
double);
687 vtkGetVector3Macro(AxisBaseForX,
double);
695 vtkSetVector3Macro(AxisBaseForY,
double);
696 vtkGetVector3Macro(AxisBaseForY,
double);
704 vtkSetVector3Macro(AxisBaseForZ,
double);
705 vtkGetVector3Macro(AxisBaseForZ,
double);
713 vtkSetMacro(AxisOnOrigin,
bool);
714 vtkGetMacro(AxisOnOrigin,
bool);
722 vtkSetMacro(ScreenSize,
double);
723 vtkGetMacro(ScreenSize,
double);
731 vtkSetMacro(LabelOffset,
double);
732 vtkGetMacro(LabelOffset,
double);
740 vtkSetMacro(ExponentOffset,
double);
741 vtkGetMacro(ExponentOffset,
double);
752 vtkSetVector2Macro(TitleOffset,
double);
753 vtkGetVector2Macro(TitleOffset,
double);
760 char* Title =
nullptr;
761 char* Exponent =
nullptr;
762 char* LabelFormat =
nullptr;
763 double Range[2] = { 0.0, 1.0 };
764 double LastRange[2] = { -1.0, -1.0 };
765 bool UseTextActor3D =
false;
766 int NumberOfLabelsBuilt = 0;
767 bool MinorTicksVisible =
true;
768 bool LastMinorTicksVisible =
true;
781 int TitleAlignLocation = VTK_ALIGN_BOTTOM;
787 int ExponentLocation = VTK_ALIGN_POINT2;
789 bool DrawGridlines =
false;
790 bool DrawGridlinesOnly =
false;
791 bool LastDrawGridlines =
false;
792 int DrawGridlinesLocation = 0;
793 int LastDrawGridlinesLocation = 0;
794 double GridlineXLength = 1.0;
795 double GridlineYLength = 1.0;
796 double GridlineZLength = 1.0;
798 bool DrawInnerGridlines =
false;
799 bool LastDrawInnerGridlines =
false;
801 bool DrawGridpolys =
false;
802 bool LastDrawGridpolys =
false;
804 bool AxisVisibility =
true;
805 bool TickVisibility =
true;
806 bool LastTickVisibility =
true;
807 bool LabelVisibility =
true;
808 bool TitleVisibility =
true;
809 bool ExponentVisibility =
false;
810 bool LastMajorTickPointCorrection =
false;
817 double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
818 double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
819 double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
825 void TransformBounds(
vtkViewport*,
double bnds[6]);
836 void RotateActor2DFromAxisProjection(
vtkTextActor* pActor2D);
854 void BuildTitle(
bool);
860 void BuildExponent(
bool force);
862 void BuildExponent2D(
vtkViewport* viewport,
bool force);
866 void SetAxisPointsAndLines();
868 bool BuildTickPoints(
double p1[3],
double p2[3],
bool force);
871 void BuildMajorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
874 void BuildMajorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
877 void BuildMinorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
880 void BuildMinorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
882 void BuildAxisGridLines(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
884 bool TickVisibilityChanged();
889 bool BoundsDisplayCoordinateChanged(
vtkViewport* viewport);
894 double MajorTickSize = 1.0;
895 double MinorTickSize = 0.5;
898 double MajorStart[3] = { 0.0, 0.0, 0.0 };
899 double DeltaMajor[3] = { 1.0, 1.0, 1.0 };
900 double MinorStart = 0.0;
901 double DeltaMinor = 1.0;
904 double MajorRangeStart = 0.0;
905 double MinorRangeStart = 0.0;
910 double DeltaRangeMinor = 1.0;
915 double DeltaRangeMajor = 1.0;
917 int LastAxisPosition = -1;
918 int LastTickLocation = -1;
982 bool AxisOnOrigin =
false;
984 bool AxisHasZeroLength =
false;
986 bool CalculateTitleOffset =
false;
987 bool CalculateLabelOffset =
false;
992 bool Use2DMode =
false;
998 double VerticalOffsetXTitle2D = -40;
1004 double HorizontalOffsetYTitle2D = -50;
1012 int SaveTitlePosition = 0;
1017 double TitleConstantPosition[2] = { 0.0, 0.0 };
1022 bool NeedBuild2D =
false;
1024 double LastMinDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1025 double LastMaxDisplayCoordinate[3] = { 0.0, 0.0, 0.0 };
1026 double TickVector[3] = { 0.0, 0.0, 0.0 };
1031 double ScreenSize = 10.0;
1037 double LabelOffset = 30.0;
1038 double TitleOffset[2] = { 20.0, 20.0 };
1039 double ExponentOffset = 20.0;
1043VTK_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_SIZEHINT(...)