59 #ifndef vtkCubeAxesActor_h
60 #define vtkCubeAxesActor_h
62 #include "vtkRenderingAnnotationModule.h"
87 virtual int RenderTranslucentGeometry(
vtkViewport*);
97 vtkSetMacro( RebuildAxes,
bool );
98 vtkGetMacro( RebuildAxes,
bool );
108 vtkSetVector6Macro(Bounds,
double);
118 virtual void GetRenderedBounds(
double rBounds[6]);
119 virtual double* GetRenderedBounds();
131 vtkSetVector2Macro( XAxisRange,
double );
132 vtkSetVector2Macro( YAxisRange,
double );
133 vtkSetVector2Macro( ZAxisRange,
double );
134 vtkGetVector2Macro( XAxisRange,
double );
135 vtkGetVector2Macro( YAxisRange,
double );
146 vtkGetVector2Macro( ZAxisRange,
double );
154 void SetScreenSize(
double screenSize);
155 vtkGetMacro(ScreenSize,
double);
163 void SetLabelOffset(
double offset);
164 vtkGetMacro(LabelOffset,
double);
172 void SetTitleOffset(
double offset);
173 vtkGetMacro(TitleOffset,
double);
187 VTK_FLY_OUTER_EDGES = 0,
188 VTK_FLY_CLOSEST_TRIAD = 1,
189 VTK_FLY_FURTHEST_TRIAD = 2,
190 VTK_FLY_STATIC_TRIAD = 3,
191 VTK_FLY_STATIC_EDGES = 4
200 vtkSetClampMacro(FlyMode,
int, VTK_FLY_OUTER_EDGES, VTK_FLY_STATIC_EDGES);
201 vtkGetMacro(FlyMode,
int);
203 {this->SetFlyMode(VTK_FLY_OUTER_EDGES);};
205 {this->SetFlyMode(VTK_FLY_CLOSEST_TRIAD);};
207 {this->SetFlyMode(VTK_FLY_FURTHEST_TRIAD);};
209 {this->SetFlyMode(VTK_FLY_STATIC_TRIAD);};
211 {this->SetFlyMode(VTK_FLY_STATIC_EDGES);};
219 vtkSetStringMacro(XTitle);
220 vtkGetStringMacro(XTitle);
221 vtkSetStringMacro(XUnits);
222 vtkGetStringMacro(XUnits);
223 vtkSetStringMacro(YTitle);
224 vtkGetStringMacro(YTitle);
225 vtkSetStringMacro(YUnits);
226 vtkGetStringMacro(YUnits);
227 vtkSetStringMacro(ZTitle);
228 vtkGetStringMacro(ZTitle);
229 vtkSetStringMacro(ZUnits);
230 vtkGetStringMacro(ZUnits);
238 vtkSetStringMacro(XLabelFormat);
239 vtkGetStringMacro(XLabelFormat);
240 vtkSetStringMacro(YLabelFormat);
241 vtkGetStringMacro(YLabelFormat);
242 vtkSetStringMacro(ZLabelFormat);
243 vtkGetStringMacro(ZLabelFormat);
253 vtkGetMacro(Inertia,
int);
262 vtkSetMacro(CornerOffset,
double);
263 vtkGetMacro(CornerOffset,
double);
277 vtkSetMacro( EnableDistanceLOD,
int );
278 vtkGetMacro( EnableDistanceLOD,
int );
285 vtkSetClampMacro( DistanceLODThreshold,
double, 0.0, 1.0 );
286 vtkGetMacro( DistanceLODThreshold,
double);
293 vtkSetMacro( EnableViewAngleLOD,
int );
294 vtkGetMacro( EnableViewAngleLOD,
int );
301 vtkSetClampMacro( ViewAngleLODThreshold,
double, 0., 1. );
302 vtkGetMacro( ViewAngleLODThreshold,
double );
360 vtkBooleanMacro(XAxisMinorTickVisibility,
vtkTypeBool);
365 vtkBooleanMacro(YAxisMinorTickVisibility,
vtkTypeBool);
369 vtkBooleanMacro(ZAxisMinorTickVisibility,
vtkTypeBool);
445 void SetXAxesInnerGridlinesProperty(
vtkProperty *);
447 void SetYAxesInnerGridlinesProperty(
vtkProperty *);
449 void SetZAxesInnerGridlinesProperty(
vtkProperty *);
467 VTK_TICKS_INSIDE = 0,
468 VTK_TICKS_OUTSIDE = 1,
476 vtkSetClampMacro(TickLocation,
int, VTK_TICKS_INSIDE, VTK_TICKS_BOTH);
477 vtkGetMacro(TickLocation,
int);
481 { this->SetTickLocation(VTK_TICKS_INSIDE); };
483 { this->SetTickLocation(VTK_TICKS_OUTSIDE); };
485 { this->SetTickLocation(VTK_TICKS_BOTH); };
487 void SetLabelScaling(
bool,
int,
int,
int);
495 void SetUseTextActor3D(
int val );
496 int GetUseTextActor3D();
504 void SetUse2DMode(
int val );
511 void SetSaveTitlePosition(
int val );
517 vtkSetVector6Macro(OrientedBounds,
double);
518 vtkGetVector6Macro(OrientedBounds,
double);
525 vtkSetMacro(UseOrientedBounds,
int);
526 vtkGetMacro(UseOrientedBounds,
int);
533 vtkSetVector3Macro(AxisBaseForX,
double);
534 vtkGetVector3Macro(AxisBaseForX,
double);
541 vtkSetVector3Macro(AxisBaseForY,
double);
542 vtkGetVector3Macro(AxisBaseForY,
double);
549 vtkSetVector3Macro(AxisBaseForZ,
double);
550 vtkGetVector3Macro(AxisBaseForZ,
double);
558 vtkSetVector3Macro(AxisOrigin,
double);
559 vtkGetVector3Macro(AxisOrigin,
double);
566 vtkSetMacro(UseAxisOrigin,
int);
567 vtkGetMacro(UseAxisOrigin,
int);
574 vtkSetMacro(GridLineLocation,
int);
575 vtkGetMacro(GridLineLocation,
int);
604 VTK_GRID_LINES_ALL = 0,
605 VTK_GRID_LINES_CLOSEST = 1,
606 VTK_GRID_LINES_FURTHEST = 2
618 void ComputeStickyAxesBoundingSphere(
vtkViewport* viewport,
const double bounds[6],
619 double sphereCenter[3],
double & sphereRadius);
624 void GetViewportLimitedBounds(
vtkViewport* viewport,
double bounds[6]);
630 static void GetBoundsPointBits(
unsigned int pointIndex,
633 unsigned int & zBit);
638 static void GetBoundsPoint(
unsigned int pointIndex,
const double bounds[6],
double point[3]);
640 int LabelExponent(
double min,
double max);
642 int Digits(
double min,
double max);
644 double MaxOf(
double,
double);
645 double MaxOf(
double,
double,
double,
double);
648 double FSign(
double,
double);
649 int FRound(
double fnt );
650 int GetNumTicks(
double range,
double fxt);
659 int FindClosestAxisIndex(
double pts[8][3]);
662 int FindFurtherstAxisIndex(
double pts[8][3]);
665 void FindBoundaryEdge(
int &indexOfAxisX,
int &indexOfAxisY,
int &indexOfAxisZ,
673 void UpdateGridLineVisibility(
int axisIndex);
716 NUMBER_OF_ALIGNED_AXIS = 4
804 double RenderedBounds[6];
805 double OrientedBounds[6];
808 double AxisOrigin[3];
811 double AxisBaseForX[3];
812 double AxisBaseForY[3];
813 double AxisBaseForZ[3];
819 vtkSetStringMacro(ActualXLabel);
820 vtkSetStringMacro(ActualYLabel);
821 vtkSetStringMacro(ActualZLabel);
824 int LastUseOrientedBounds;
833 bool AutoLabelScaling;
839 double LastXRange[2];
840 double LastYRange[2];
841 double LastZRange[2];
842 double LastBounds[6];
846 int RenderAxesX[NUMBER_OF_ALIGNED_AXIS];
847 int RenderAxesY[NUMBER_OF_ALIGNED_AXIS];
848 int RenderAxesZ[NUMBER_OF_ALIGNED_AXIS];
854 bool MustAdjustXValue;
855 bool MustAdjustYValue;
856 bool MustAdjustZValue;
858 bool ForceXLabelReset;
859 bool ForceYLabelReset;
860 bool ForceZLabelReset;
862 double XAxisRange[2];
863 double YAxisRange[2];
864 double ZAxisRange[2];
878 double MajorStart[3];
879 double DeltaMajor[3];
884 void TransformBounds(
vtkViewport *viewport,
const double bounds[6],
886 void AdjustAxes(
double bounds[6],
887 double xCoords[NUMBER_OF_ALIGNED_AXIS][6],
888 double yCoords[NUMBER_OF_ALIGNED_AXIS][6],
889 double zCoords[NUMBER_OF_ALIGNED_AXIS][6],
890 double xRange[2],
double yRange[2],
double zRange[2]);
892 bool ComputeTickSize(
double bounds[6]);
893 void AdjustValues(
const double xRange[2],
894 const double yRange[2],
895 const double zRange[2]);
896 void AdjustRange(
const double bounds[6]);
899 void SetNonDependentAttributes(
void);
900 void BuildLabels(
vtkAxisActor *axes[NUMBER_OF_ALIGNED_AXIS]);
901 void AdjustTicksComputeRange(
vtkAxisActor *axes[NUMBER_OF_ALIGNED_AXIS],
902 double rangeMin,
double rangeMax);