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);
93 virtual double *GetPoint1();
102 { this->SetPoint2(x[0], x[1], x[2]); }
103 virtual void SetPoint2(
double x,
double y,
double z);
104 virtual double *GetPoint2();
112 vtkSetVector2Macro(Range,
double);
113 vtkGetVectorMacro(Range,
double, 2);
120 void SetBounds(
const double bounds[6]);
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);
159 void SetTitle(
const char *t);
167 void SetExponent(
const char *t);
176 vtkGetMacro(MajorTickSize,
double);
184 vtkGetMacro(MinorTickSize,
double);
189 VTK_TICKS_INSIDE = 0,
190 VTK_TICKS_OUTSIDE = 1,
200 vtkSetClampMacro(TickLocation,
int, VTK_TICKS_INSIDE, VTK_TICKS_BOTH);
201 vtkGetMacro(TickLocation,
int);
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);
419 vtkGetMacro(AxisType,
int);
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);
451 vtkGetMacro(AxisPosition,
int);
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); };
477 virtual int RenderTranslucentGeometry(
vtkViewport* viewport);
490 double ComputeMaxLabelLength(
const double [3]);
491 double ComputeTitleLength(
const double [3]);
493 void SetLabelScale(
const double scale);
494 void SetLabelScale(
int labelIndex,
const double scale);
495 void SetTitleScale(
const double scale);
503 vtkGetMacro(MinorStart,
double);
504 double GetMajorStart(
int axis);
505 void SetMajorStart(
int axis,
double value);
509 vtkGetMacro(DeltaMinor,
double);
510 double GetDeltaMajor(
int axis);
511 void SetDeltaMajor(
int axis,
double value);
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]);
761 void BuildLabels(vtkViewport *,
bool);
762 void BuildLabels2D(vtkViewport *,
bool);
763 void SetLabelPositions(vtkViewport *,
bool);
764 void SetLabelPositions2D(vtkViewport *,
bool);
769 void RotateActor2DFromAxisProjection(
vtkTextActor* pActor2D);
786 void BuildTitle(
bool);
791 void BuildExponent(
bool force);
793 void BuildExponent2D(vtkViewport *viewport,
bool force);
795 void BuildTitle2D(vtkViewport *viewport,
bool);
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;
virtual void SetPoint1(double x[3])
Specify the position of the first point defining the axis.
int TickLocation
The location of the ticks.
represents an object (geometry & properties) in a rendered scene
void SetAxisTypeToY(void)
Set/Get the type of this axis.
int LastMinorTicksVisible
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)
Support the standard render methods.
abstract specification for Viewports
represent surface properties of a geometric object
int LastDrawInnerGridlines
virtual void SetPoint2(double x[3])
Specify the position of the second point defining the axis.
virtual int RenderOverlay(vtkViewport *)
record modification and/or execution time
Create an axis with tick marks and labels.
vtkProp3DAxisFollower ** GetLabelProps3D()
Get label actors responsigle for drawing label text.
a vtkAbstractArray subclass for strings
void SetTickLocationToInside(void)
concrete dataset represents vertices, lines, polygons, and triangle strips
static vtkActor * New()
Creates an actor with the following defaults: origin(0,0,0) position=(0,0,0) scale=(1,1,1) visibility=1 pickable=1 dragable=1 orientation=(0,0,0).
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
int DrawGridlinesLocation
void SetAxisPositionToMaxMin(void)
window superclass for vtkRenderWindow
void SetAxisTypeToX(void)
Set/Get the type of this axis.
An actor that displays text.
a simple class to control print indentation
a virtual camera for 3D rendering
void SetAxisPositionToMaxMax(void)
vtkAxisFollower ** GetLabelActors()
Get label actors responsigle for drawing label text.
void SetTickLocationToBoth(void)
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
An actor that displays text.
represent text properties.
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
a subclass of vtkFollower that ensures that data is always parallel to the axis defined by a vtkAxisA...
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
double * GetBounds()
Return a reference to the Prop3D's composite transform.
void SetAxisPositionToMinMax(void)
map vtkPolyData to graphics primitives
void SetAxisPositionToMinMin(void)
a subclass of actor that always faces the camera
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
Support the standard render methods.
int TitleAlignLocation
Hold the alignement property of the title related to the axis.
a subclass of vtkProp3DFollower that ensures that data is always parallel to the axis defined by a vt...
virtual int HasTranslucentPolygonalGeometry()
Does this prop have some translucent polygonal geometry?
int LastDrawGridlinesLocation
void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this actor.
represent surface properties of a 2D image
void SetAxisTypeToZ(void)
Set/Get the type of this axis.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetTickLocationToOutside(void)
represent and manipulate 3D points
int ExponentLocation
Hold the alignement property of the exponent coming from the label values.