Go to the documentation of this file.
53 #ifndef vtkAxisActor_h
54 #define vtkAxisActor_h
56 #include "vtkRenderingAnnotationModule.h"
91 { this->SetPoint1(x[0], x[1], x[2]); }
92 virtual void SetPoint1(
double x,
double y,
double z);
102 { this->SetPoint2(x[0], x[1], x[2]); }
112 vtkSetVector2Macro(Range,
double);
113 vtkGetVectorMacro(Range,
double, 2);
121 void SetBounds(
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
130 vtkSetStringMacro(LabelFormat);
143 vtkGetMacro(UseTextActor3D,
int);
151 vtkGetMacro(MinorTicksVisible,
int);
176 vtkGetMacro(MajorTickSize,
double);
184 vtkGetMacro(MinorTickSize,
double);
189 VTK_TICKS_INSIDE = 0,
190 VTK_TICKS_OUTSIDE = 1,
205 { this->SetTickLocation(VTK_TICKS_INSIDE); };
207 { this->SetTickLocation(VTK_TICKS_OUTSIDE); };
209 { this->SetTickLocation(VTK_TICKS_BOTH); };
216 vtkGetMacro(AxisVisibility,
int);
225 vtkGetMacro(TickVisibility,
int);
234 vtkGetMacro(LabelVisibility,
int);
243 vtkGetMacro(TitleVisibility,
int);
252 vtkGetMacro(ExponentVisibility,
bool);
259 VTK_ALIGN_BOTTOM = 1,
260 VTK_ALIGN_POINT1 = 2,
269 vtkSetClampMacro(TitleAlignLocation,
int, VTK_ALIGN_TOP, VTK_ALIGN_POINT2);
270 vtkGetMacro(TitleAlignLocation,
int);
278 vtkSetClampMacro(ExponentLocation,
int, VTK_ALIGN_TOP, VTK_ALIGN_POINT2);
279 vtkGetMacro(ExponentLocation,
int);
359 vtkGetMacro(DrawGridlines,
int);
370 vtkGetMacro(DrawGridlinesOnly,
int);
375 vtkGetMacro(DrawGridlinesLocation,
int);
382 vtkGetMacro(DrawInnerGridlines,
int);
391 vtkGetMacro(GridlineXLength,
double);
393 vtkGetMacro(GridlineYLength,
double);
395 vtkGetMacro(GridlineZLength,
double);
403 vtkGetMacro(DrawGridpolys,
int);
418 vtkSetClampMacro(
AxisType,
int, VTK_AXIS_TYPE_X, VTK_AXIS_TYPE_Z);
427 VTK_AXIS_POS_MINMIN = 0,
428 VTK_AXIS_POS_MINMAX = 1,
429 VTK_AXIS_POS_MAXMAX = 2,
430 VTK_AXIS_POS_MAXMIN = 3
438 vtkGetMacro(Log,
bool);
450 vtkSetClampMacro(
AxisPosition,
int, VTK_AXIS_POS_MINMIN, VTK_AXIS_POS_MAXMIN);
455 { this->SetAxisPosition(VTK_AXIS_POS_MINMIN); };
457 { this->SetAxisPosition(VTK_AXIS_POS_MINMAX); };
459 { this->SetAxisPosition(VTK_AXIS_POS_MAXMAX); };
461 { this->SetAxisPosition(VTK_AXIS_POS_MAXMIN); };
503 vtkGetMacro(MinorStart,
double);
509 vtkGetMacro(DeltaMinor,
double);
524 vtkGetMacro(MinorRangeStart,
double);
526 vtkGetMacro(MajorRangeStart,
double);
528 vtkGetMacro(DeltaRangeMinor,
double);
530 vtkGetMacro(DeltaRangeMajor,
double);
557 return this->LabelActors;
573 return this->LabelProps3D;
589 vtkGetMacro(NumberOfLabelsBuilt,
int);
598 vtkGetMacro(CalculateTitleOffset,
int);
608 vtkGetMacro(CalculateLabelOffset,
int);
617 vtkGetMacro(Use2DMode,
int);
625 vtkGetMacro(VerticalOffsetXTitle2D,
double);
633 vtkGetMacro(HorizontalOffsetYTitle2D,
double);
641 vtkGetMacro(SaveTitlePosition,
int);
648 vtkSetVector3Macro(AxisBaseForX,
double);
649 vtkGetVector3Macro(AxisBaseForX,
double);
656 vtkSetVector3Macro(AxisBaseForY,
double);
657 vtkGetVector3Macro(AxisBaseForY,
double);
664 vtkSetVector3Macro(AxisBaseForZ,
double);
665 vtkGetVector3Macro(AxisBaseForZ,
double);
673 vtkGetMacro(AxisOnOrigin,
int);
681 vtkGetMacro(LabelOffset,
double);
683 vtkGetMacro(TitleOffset,
double);
685 vtkGetMacro(ExponentOffset,
double);
687 vtkGetMacro(ScreenSize,
double);
751 double AxisBaseForX[3];
752 double AxisBaseForY[3];
753 double AxisBaseForZ[3];
757 void operator=(
const vtkAxisActor&) VTK_DELETE_FUNCTION;
759 void TransformBounds(
vtkViewport *,
double bnds[6]);
769 void RotateActor2DFromAxisProjection(
vtkTextActor* pActor2D);
786 void BuildTitle(
bool);
791 void BuildExponent(
bool force);
793 void BuildExponent2D(
vtkViewport *viewport,
bool force);
797 void SetAxisPointsAndLines(
void);
799 bool BuildTickPoints(
double p1[3],
double p2[3],
bool force);
802 void BuildMajorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
805 void BuildMajorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
808 void BuildMinorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
811 void BuildMinorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
813 void BuildAxisGridLines(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
815 bool TickVisibilityChanged(
void);
820 bool BoundsDisplayCoordinateChanged(
vtkViewport *viewport);
825 double MajorTickSize;
826 double MinorTickSize;
829 double MajorStart[3];
830 double DeltaMajor[3];
835 double MajorRangeStart;
836 double MinorRangeStart;
841 double DeltaRangeMinor;
846 double DeltaRangeMajor;
848 int LastAxisPosition;
850 int LastTickLocation;
851 double LastLabelStart;
895 vtkActor *AxisMajorTicksActor, *AxisMinorTicksActor;
917 int AxisHasZeroLength;
919 int CalculateTitleOffset;
920 int CalculateLabelOffset;
931 double VerticalOffsetXTitle2D;
937 double HorizontalOffsetYTitle2D;
945 int SaveTitlePosition;
950 double TitleConstantPosition[2];
957 double LastMinDisplayCoordinate[3];
958 double LastMaxDisplayCoordinate[3];
959 double TickVector[3];
968 double ExponentOffset;
map vtkPolyData to graphics primitives
represent and manipulate 3D points
void SetTitleScale(const double scale)
a subclass of actor that always faces the camera
void SetAxisMajorTicksProperty(vtkProperty *)
Get/Set axis actor property (axis and its ticks)
void SetAxisMinorTicksProperty(vtkProperty *)
Get/Set axis actor property (axis and its ticks)
Create an axis with tick marks and labels.
void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
vtkProp3DAxisFollower ** GetLabelProps3D()
Get label actors responsigle for drawing label text.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void SetBounds(const double bounds[6])
Set or get the bounds for this Actor as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
int ExponentLocation
Hold the alignement property of the exponent coming from the label values.
void SetTickLocationToInside(void)
void GetBounds(double bounds[6])
double * GetBounds(void)
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
int TickLocation
The location of the ticks.
An actor that displays text.
void SetLabelScale(int labelIndex, const double scale)
int HasTranslucentPolygonalGeometry()
Does this prop have some translucent polygonal geometry?
virtual void SetCamera(vtkCamera *)
Set/Get the camera for this axis.
record modification and/or execution time
int DrawGridlinesLocation
static vtkAxisActor * New()
Instantiate object.
void SetAxisTypeToY(void)
int LastMinorTicksVisible
virtual vtkCoordinate * GetPoint1Coordinate()
Specify the position of the first point defining the axis.
double ComputeMaxLabelLength(const double[3])
virtual vtkCoordinate * GetPoint2Coordinate()
Specify the position of the second point defining the axis.
void SetDeltaMajor(int axis, double value)
void SetTitle(const char *t)
Set/Get the title of the axis actor,.
window superclass for vtkRenderWindow
vtkProperty * GetAxisLinesProperty()
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
Draw the axis.
vtkProperty * GetGridpolysProperty()
double ComputeTitleLength(const double[3])
vtkProperty * GetInnerGridlinesProperty()
a subclass of vtkFollower that ensures that data is always parallel to the axis defined by a vtkAxisA...
represents an object (geometry & properties) in a rendered scene
void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this actor.
An actor that displays text.
a simple class to control print indentation
a virtual camera for 3D rendering
void SetGridlinesProperty(vtkProperty *)
Get/Set gridlines actor property (outer grid lines)
void SetExponent(const char *t)
Set/Get the common exponent of the labels values.
void SetAxisTypeToX(void)
vtkProperty * GetAxisMainLineProperty()
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
virtual void SetPoint2(double x, double y, double z)
int TitleAlignLocation
Hold the alignement property of the title related to the axis.
double GetMajorStart(int axis)
vtkProperty * GetAxisMinorTicksProperty()
void SetAxisPositionToMaxMin(void)
void BuildAxis(vtkViewport *viewport, bool)
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
void SetAxisTypeToZ(void)
int LastDrawGridlinesLocation
abstract specification for Viewports
virtual double * GetPoint2()
vtkAxisFollower ** GetLabelActors()
Get label actors responsigle for drawing label text.
void SetTickLocationToBoth(void)
represent text properties.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
void SetTickLocationToOutside(void)
represent surface properties of a 2D image
void SetAxisLinesProperty(vtkProperty *)
Get/Set axis actor property (axis and its ticks) (kept for compatibility)
void SetAxisPositionToMaxMax(void)
void SetMajorStart(int axis, double value)
void SetGridpolysProperty(vtkProperty *)
Get/Set gridPolys actor property (grid quads)
void SetLabels(vtkStringArray *labels)
virtual int RenderOverlay(vtkViewport *viewport)
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)
virtual void SetLabelTextProperty(vtkTextProperty *p)
Set/Get the axis labels text property.
concrete dataset represents vertices, lines, polygons, and triangle strips
virtual void SetPoint1(double x[3])
a vtkAbstractArray subclass for strings
vtkProperty * GetAxisMajorTicksProperty()
void SetAxisPositionToMinMax(void)
vtkProperty * GetGridlinesProperty()
void SetAxisMainLineProperty(vtkProperty *)
Get/Set main line axis actor property.
represent surface properties of a geometric object
virtual void SetPoint1(double x, double y, double z)
void SetLabelScale(const double scale)
virtual void SetTitleTextProperty(vtkTextProperty *p)
Set/Get the axis title text property.
a subclass of vtkProp3DFollower that ensures that data is always parallel to the axis defined by a vt...
void SetAxisPositionToMinMin(void)
virtual double * GetPoint1()
int LastDrawInnerGridlines
virtual void SetPoint2(double x[3])
double GetDeltaMajor(int axis)
vtkTimeStamp BuildTime
Updates the extensions string.
void SetInnerGridlinesProperty(vtkProperty *)
Get/Set inner gridlines actor property.
virtual int RenderTranslucentGeometry(vtkViewport *viewport)