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;
represents an object (geometry & properties) in a rendered scene
Create an axis with tick marks and labels.
int LastDrawGridlinesLocation
int LastMinorTicksVisible
void SetAxisTypeToZ(void)
virtual void SetPoint2(double x, double y, double z)
virtual vtkCoordinate * GetPoint1Coordinate()
Specify the position of the first point defining the axis.
virtual void SetCamera(vtkCamera *)
Set/Get the camera for this axis.
void SetAxisPositionToMinMin(void)
virtual void SetPoint2(double x[3])
void SetDeltaMajor(int axis, double value)
vtkProperty * GetAxisMajorTicksProperty()
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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).
vtkProp3DAxisFollower ** GetLabelProps3D()
Get label actors responsigle for drawing label text.
double ComputeMaxLabelLength(const double[3])
static vtkAxisActor * New()
Instantiate object.
void SetTickLocationToOutside(void)
double GetMajorStart(int axis)
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 SetLabelScale(int labelIndex, const double scale)
void SetTitle(const char *t)
Set/Get the title of the axis actor,.
vtkProperty * GetGridlinesProperty()
virtual void SetLabelTextProperty(vtkTextProperty *p)
Set/Get the axis labels text property.
double * GetBounds(void)
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
double GetDeltaMajor(int axis)
vtkProperty * GetInnerGridlinesProperty()
virtual void SetPoint1(double x[3])
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()
void SetAxisMajorTicksProperty(vtkProperty *)
Get/Set axis actor property (axis and its ticks)
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)
void SetBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
int TitleAlignLocation
Hold the alignement property of the title related to the axis.
void BuildAxis(vtkViewport *viewport, bool)
void GetBounds(double bounds[6])
void SetAxisTypeToX(void)
vtkProperty * GetAxisMinorTicksProperty()
int ExponentLocation
Hold the alignement property of the exponent coming from the label values.
int LastDrawInnerGridlines
void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this actor.
void SetAxisPositionToMaxMax(void)
int HasTranslucentPolygonalGeometry()
Does this prop have some translucent polygonal geometry?
vtkProperty * GetGridpolysProperty()
vtkProperty * GetAxisLinesProperty()
virtual void SetTitleTextProperty(vtkTextProperty *p)
Set/Get the axis title text property.
double ComputeTitleLength(const double[3])
void SetLabelScale(const double scale)
virtual int RenderTranslucentGeometry(vtkViewport *viewport)
virtual int RenderOverlay(vtkViewport *viewport)
void SetLabels(vtkStringArray *labels)
virtual double * GetPoint2()
void SetTickLocationToInside(void)
int TickLocation
The location of the ticks.
void SetAxisPositionToMinMax(void)
vtkAxisFollower ** GetLabelActors()
Get label actors responsigle for drawing label text.
virtual void SetPoint1(double x, double y, double z)
void SetAxisMinorTicksProperty(vtkProperty *)
Get/Set axis actor property (axis and its ticks)
void SetAxisTypeToY(void)
void SetMajorStart(int axis, double value)
vtkProperty * GetAxisMainLineProperty()
void SetTickLocationToBoth(void)
void SetExponent(const char *t)
Set/Get the common exponent of the labels values.
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
Draw the axis.
void SetTitleScale(const double scale)
int DrawGridlinesLocation
void SetGridpolysProperty(vtkProperty *)
Get/Set gridPolys actor property (grid quads)
void SetAxisPositionToMaxMin(void)
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
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkTimeStamp BuildTime
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.