53 #ifndef vtkAxisActor_h 54 #define vtkAxisActor_h 57 #include "vtkRenderingAnnotationModule.h" 91 virtual void SetPoint1(
double x,
double y,
double z);
92 virtual double* GetPoint1();
101 virtual void SetPoint2(
double x,
double y,
double z);
102 virtual double* GetPoint2();
110 vtkSetVector2Macro(Range,
double);
111 vtkGetVectorMacro(Range,
double, 2);
118 void SetBounds(
const double bounds[6]);
119 void SetBounds(
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax);
128 vtkSetStringMacro(LabelFormat);
141 vtkGetMacro(UseTextActor3D,
int);
149 vtkGetMacro(MinorTicksVisible,
int);
157 void SetTitle(
const char* t);
165 void SetExponent(
const char* t);
174 vtkGetMacro(MajorTickSize,
double);
182 vtkGetMacro(MinorTickSize,
double);
187 VTK_TICKS_INSIDE = 0,
188 VTK_TICKS_OUTSIDE = 1,
198 vtkSetClampMacro(TickLocation,
int, VTK_TICKS_INSIDE, VTK_TICKS_BOTH);
199 vtkGetMacro(TickLocation,
int);
211 vtkGetMacro(AxisVisibility,
int);
220 vtkGetMacro(TickVisibility,
int);
229 vtkGetMacro(LabelVisibility,
int);
238 vtkGetMacro(TitleVisibility,
int);
247 vtkGetMacro(ExponentVisibility,
bool);
256 vtkGetMacro(LastMajorTickPointCorrection,
bool);
263 VTK_ALIGN_BOTTOM = 1,
264 VTK_ALIGN_POINT1 = 2,
273 virtual void SetTitleAlignLocation(
int location);
274 vtkGetMacro(TitleAlignLocation,
int);
282 virtual void SetExponentLocation(
int location);
283 vtkGetMacro(ExponentLocation,
int);
363 vtkGetMacro(DrawGridlines,
int);
374 vtkGetMacro(DrawGridlinesOnly,
int);
379 vtkGetMacro(DrawGridlinesLocation,
int);
386 vtkGetMacro(DrawInnerGridlines,
int);
395 vtkGetMacro(GridlineXLength,
double);
397 vtkGetMacro(GridlineYLength,
double);
399 vtkGetMacro(GridlineZLength,
double);
407 vtkGetMacro(DrawGridpolys,
int);
422 vtkSetClampMacro(AxisType,
int, VTK_AXIS_TYPE_X, VTK_AXIS_TYPE_Z);
423 vtkGetMacro(AxisType,
int);
431 VTK_AXIS_POS_MINMIN = 0,
432 VTK_AXIS_POS_MINMAX = 1,
433 VTK_AXIS_POS_MAXMAX = 2,
434 VTK_AXIS_POS_MAXMIN = 3
442 vtkGetMacro(Log,
bool);
454 vtkSetClampMacro(AxisPosition,
int, VTK_AXIS_POS_MINMIN, VTK_AXIS_POS_MAXMIN);
455 vtkGetMacro(AxisPosition,
int);
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);
583 vtkGetMacro(NumberOfLabelsBuilt,
int);
592 vtkGetMacro(CalculateTitleOffset,
int);
602 vtkGetMacro(CalculateLabelOffset,
int);
611 vtkGetMacro(Use2DMode,
int);
619 vtkGetMacro(VerticalOffsetXTitle2D,
double);
627 vtkGetMacro(HorizontalOffsetYTitle2D,
double);
635 vtkGetMacro(SaveTitlePosition,
int);
642 vtkSetVector3Macro(AxisBaseForX,
double);
643 vtkGetVector3Macro(AxisBaseForX,
double);
650 vtkSetVector3Macro(AxisBaseForY,
double);
651 vtkGetVector3Macro(AxisBaseForY,
double);
658 vtkSetVector3Macro(AxisBaseForZ,
double);
659 vtkGetVector3Macro(AxisBaseForZ,
double);
667 vtkGetMacro(AxisOnOrigin,
int);
675 vtkGetMacro(LabelOffset,
double);
677 vtkGetMacro(TitleOffset,
double);
679 vtkGetMacro(ExponentOffset,
double);
681 vtkGetMacro(ScreenSize,
double);
745 double AxisBaseForX[3];
746 double AxisBaseForY[3];
747 double AxisBaseForZ[3];
753 void TransformBounds(
vtkViewport*,
double bnds[6]);
764 void RotateActor2DFromAxisProjection(
vtkTextActor* pActor2D);
782 void BuildTitle(
bool);
788 void BuildExponent(
bool force);
790 void BuildExponent2D(
vtkViewport* viewport,
bool force);
794 void SetAxisPointsAndLines(
void);
796 bool BuildTickPoints(
double p1[3],
double p2[3],
bool force);
799 void BuildMajorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
802 void BuildMajorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
805 void BuildMinorTicks(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
808 void BuildMinorTicksLog(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
810 void BuildAxisGridLines(
double p1[3],
double p2[3],
double localCoordSys[3][3]);
812 bool TickVisibilityChanged(
void);
817 bool BoundsDisplayCoordinateChanged(
vtkViewport* viewport);
822 double MajorTickSize;
823 double MinorTickSize;
826 double MajorStart[3];
827 double DeltaMajor[3];
832 double MajorRangeStart;
833 double MinorRangeStart;
838 double DeltaRangeMinor;
843 double DeltaRangeMajor;
845 int LastAxisPosition;
847 int LastTickLocation;
848 double LastLabelStart;
892 vtkActor *AxisMajorTicksActor, *AxisMinorTicksActor;
914 int AxisHasZeroLength;
916 int CalculateTitleOffset;
917 int CalculateLabelOffset;
928 double VerticalOffsetXTitle2D;
934 double HorizontalOffsetYTitle2D;
942 int SaveTitlePosition;
947 double TitleConstantPosition[2];
954 double LastMinDisplayCoordinate[3];
955 double LastMaxDisplayCoordinate[3];
956 double TickVector[3];
965 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
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 *)
int HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
record modification and/or execution time
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.
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 ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
int DrawGridlinesLocation
void SetAxisPositionToMaxMin(void)
window superclass for vtkRenderWindow
void SetAxisTypeToX(void)
Set/Get the type of this axis.
An actor that displays text.
bool LastMajorTickPointCorrection
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.
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
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.
void SetAxisPositionToMinMax(void)
map vtkPolyData to graphics primitives
void SetAxisPositionToMinMin(void)
a subclass of actor that always faces the camera
int TitleAlignLocation
Hold the alignment 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...
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
int LastDrawGridlinesLocation
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)
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
represent and manipulate 3D points
int ExponentLocation
Hold the alignment property of the exponent coming from the label values.