Go to the documentation of this file.
59 #ifndef vtkCubeAxesActor_h
60 #define vtkCubeAxesActor_h
62 #include "vtkRenderingAnnotationModule.h"
98 vtkGetMacro( RebuildAxes,
bool );
108 vtkSetVector6Macro(Bounds,
double);
109 vtkGetVector6Macro(Bounds,
double);
130 vtkSetVector2Macro( XAxisRange,
double );
131 vtkSetVector2Macro( YAxisRange,
double );
132 vtkSetVector2Macro( ZAxisRange,
double );
133 vtkGetVector2Macro( XAxisRange,
double );
134 vtkGetVector2Macro( YAxisRange,
double );
145 vtkGetVector2Macro( ZAxisRange,
double );
154 vtkGetMacro(ScreenSize,
double);
163 vtkGetMacro(LabelOffset,
double);
172 vtkGetMacro(TitleOffset,
double);
186 VTK_FLY_OUTER_EDGES = 0,
187 VTK_FLY_CLOSEST_TRIAD = 1,
188 VTK_FLY_FURTHEST_TRIAD = 2,
189 VTK_FLY_STATIC_TRIAD = 3,
190 VTK_FLY_STATIC_EDGES = 4
199 vtkSetClampMacro(
FlyMode,
int, VTK_FLY_OUTER_EDGES, VTK_FLY_STATIC_EDGES);
202 {this->SetFlyMode(VTK_FLY_OUTER_EDGES);};
204 {this->SetFlyMode(VTK_FLY_CLOSEST_TRIAD);};
206 {this->SetFlyMode(VTK_FLY_FURTHEST_TRIAD);};
208 {this->SetFlyMode(VTK_FLY_STATIC_TRIAD);};
210 {this->SetFlyMode(VTK_FLY_STATIC_EDGES);};
218 vtkSetStringMacro(XTitle);
220 vtkSetStringMacro(XUnits);
222 vtkSetStringMacro(YTitle);
224 vtkSetStringMacro(YUnits);
226 vtkSetStringMacro(ZTitle);
228 vtkSetStringMacro(ZUnits);
237 vtkSetStringMacro(XLabelFormat);
239 vtkSetStringMacro(YLabelFormat);
241 vtkSetStringMacro(ZLabelFormat);
252 vtkGetMacro(Inertia,
int);
262 vtkGetMacro(CornerOffset,
double);
277 vtkGetMacro( EnableDistanceLOD,
int );
284 vtkSetClampMacro( DistanceLODThreshold,
double, 0.0, 1.0 );
285 vtkGetMacro( DistanceLODThreshold,
double);
293 vtkGetMacro( EnableViewAngleLOD,
int );
300 vtkSetClampMacro( ViewAngleLODThreshold,
double, 0., 1. );
301 vtkGetMacro( ViewAngleLODThreshold,
double );
309 vtkGetMacro(XAxisVisibility,
int);
312 vtkGetMacro(YAxisVisibility,
int);
315 vtkGetMacro(ZAxisVisibility,
int);
324 vtkGetMacro(XAxisLabelVisibility,
int);
329 vtkGetMacro(YAxisLabelVisibility,
int);
333 vtkGetMacro(ZAxisLabelVisibility,
int);
341 vtkGetMacro(XAxisTickVisibility,
int);
346 vtkGetMacro(YAxisTickVisibility,
int);
350 vtkGetMacro(ZAxisTickVisibility,
int);
358 vtkGetMacro(XAxisMinorTickVisibility,
int);
363 vtkGetMacro(YAxisMinorTickVisibility,
int);
367 vtkGetMacro(ZAxisMinorTickVisibility,
int);
371 vtkGetMacro(DrawXGridlines,
int);
375 vtkGetMacro(DrawYGridlines,
int);
379 vtkGetMacro(DrawZGridlines,
int);
383 vtkGetMacro(DrawXInnerGridlines,
int);
387 vtkGetMacro(DrawYInnerGridlines,
int);
391 vtkGetMacro(DrawZInnerGridlines,
int);
395 vtkGetMacro(DrawXGridpolys,
int);
399 vtkGetMacro(DrawYGridpolys,
int);
403 vtkGetMacro(DrawZGridpolys,
int);
466 VTK_TICKS_INSIDE = 0,
467 VTK_TICKS_OUTSIDE = 1,
480 { this->SetTickLocation(VTK_TICKS_INSIDE); };
482 { this->SetTickLocation(VTK_TICKS_OUTSIDE); };
484 { this->SetTickLocation(VTK_TICKS_BOTH); };
516 vtkSetVector6Macro(OrientedBounds,
double);
517 vtkGetVector6Macro(OrientedBounds,
double);
525 vtkGetMacro(UseOrientedBounds,
int);
532 vtkSetVector3Macro(AxisBaseForX,
double);
533 vtkGetVector3Macro(AxisBaseForX,
double);
540 vtkSetVector3Macro(AxisBaseForY,
double);
541 vtkGetVector3Macro(AxisBaseForY,
double);
548 vtkSetVector3Macro(AxisBaseForZ,
double);
549 vtkGetVector3Macro(AxisBaseForZ,
double);
557 vtkSetVector3Macro(AxisOrigin,
double);
558 vtkGetVector3Macro(AxisOrigin,
double);
566 vtkGetMacro(UseAxisOrigin,
int);
574 vtkGetMacro(GridLineLocation,
int);
584 vtkGetMacro(StickyAxes,
int);
597 vtkGetMacro(CenterStickyAxes,
int);
603 VTK_GRID_LINES_ALL = 0,
604 VTK_GRID_LINES_CLOSEST = 1,
605 VTK_GRID_LINES_FURTHEST = 2
618 double sphereCenter[3],
double & sphereRadius);
632 unsigned int & zBit);
644 double MaxOf(
double,
double,
double,
double);
717 NUMBER_OF_ALIGNED_AXIS = 4
805 double RenderedBounds[6];
806 double OrientedBounds[6];
809 double AxisOrigin[3];
812 double AxisBaseForX[3];
813 double AxisBaseForY[3];
814 double AxisBaseForZ[3];
820 vtkSetStringMacro(ActualXLabel);
821 vtkSetStringMacro(ActualYLabel);
822 vtkSetStringMacro(ActualZLabel);
825 int LastUseOrientedBounds;
834 bool AutoLabelScaling;
840 double LastXRange[2];
841 double LastYRange[2];
842 double LastZRange[2];
843 double LastBounds[6];
847 int RenderAxesX[NUMBER_OF_ALIGNED_AXIS];
848 int RenderAxesY[NUMBER_OF_ALIGNED_AXIS];
849 int RenderAxesZ[NUMBER_OF_ALIGNED_AXIS];
855 bool MustAdjustXValue;
856 bool MustAdjustYValue;
857 bool MustAdjustZValue;
859 bool ForceXLabelReset;
860 bool ForceYLabelReset;
861 bool ForceZLabelReset;
863 double XAxisRange[2];
864 double YAxisRange[2];
865 double ZAxisRange[2];
879 double MajorStart[3];
880 double DeltaMajor[3];
885 void TransformBounds(
vtkViewport *viewport,
const double bounds[6],
887 void AdjustAxes(
double bounds[6],
888 double xCoords[NUMBER_OF_ALIGNED_AXIS][6],
889 double yCoords[NUMBER_OF_ALIGNED_AXIS][6],
890 double zCoords[NUMBER_OF_ALIGNED_AXIS][6],
891 double xRange[2],
double yRange[2],
double zRange[2]);
893 bool ComputeTickSize(
double bounds[6]);
894 void AdjustValues(
const double xRange[2],
895 const double yRange[2],
896 const double zRange[2]);
897 void AdjustRange(
const double bounds[6]);
900 void SetNonDependentAttributes(
void);
901 void BuildLabels(
vtkAxisActor *axes[NUMBER_OF_ALIGNED_AXIS]);
902 void AdjustTicksComputeRange(
vtkAxisActor *axes[NUMBER_OF_ALIGNED_AXIS],
903 double rangeMin,
double rangeMax);
void SetTitleOffset(double offset)
Explicitly specify the distance between title and labels.
vtkProperty * GetYAxesGridlinesProperty()
vtkProperty * GetXAxesLinesProperty()
virtual int RenderOpaqueGeometry(vtkViewport *)
Draw the axes as per the vtkProp superclass' API.
void SetXAxesLinesProperty(vtkProperty *)
Get/Set axes actors properties.
vtkProperty * ZAxesGridpolysProperty
int StickyAxes
Flag for axes stickiness.
void SetUseTextActor3D(int val)
Use or not vtkTextActor3D for titles and labels.
vtkProperty * ZAxesGridlinesProperty
Create an axis with tick marks and labels.
double MaxOf(double, double, double, double)
vtkProperty * GetXAxesInnerGridlinesProperty()
vtkProperty * XAxesGridlinesProperty
void SetTickLocationToBoth(void)
double DistanceLODThreshold
Default is 0.80 This determines at what fraction of camera far clip range, actor is not visible.
double MaxOf(double, double)
void SetAxisLabels(int axis, vtkStringArray *value)
vtkProperty * XAxesInnerGridlinesProperty
void SetZAxesGridpolysProperty(vtkProperty *)
record modification and/or execution time
void SetFlyModeToClosestTriad()
vtkProperty * GetXAxesGridpolysProperty()
void SetYAxesGridpolysProperty(vtkProperty *)
int XAxisMinorTickVisibility
create a plot of a bounding box edges - used for navigation
virtual int RenderOverlay(vtkViewport *)
vtkProperty * GetZAxesGridlinesProperty()
void SetFlyModeToStaticEdges()
void ComputeStickyAxesBoundingSphere(vtkViewport *viewport, const double bounds[6], double sphereCenter[3], double &sphereRadius)
Computes a bounding sphere used to determine the sticky bounding box.
void SetYAxesInnerGridlinesProperty(vtkProperty *)
int EnableDistanceLOD
If enabled the actor will not be visible at a certain distance from the camera.
void GetViewportLimitedBounds(vtkViewport *viewport, double bounds[6])
Get bounds such that the axes are entirely within a viewport.
vtkProperty * GetXAxesGridlinesProperty()
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
void SetZAxesGridlinesProperty(vtkProperty *)
int Digits(double min, double max)
void SetYAxesGridlinesProperty(vtkProperty *)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkProperty * YAxesInnerGridlinesProperty
int ZAxisMinorTickVisibility
window superclass for vtkRenderWindow
vtkProperty * GetZAxesInnerGridlinesProperty()
int LabelExponent(double min, double max)
static void GetBoundsPointBits(unsigned int pointIndex, unsigned int &xBit, unsigned int &yBit, unsigned int &zBit)
Get the bits for a bounds point.
void SetXAxesGridlinesProperty(vtkProperty *)
Get/Set axes (outer) gridlines actors properties.
static vtkCubeAxesActor * New()
Instantiate object with label format "6.3g" and the number of labels per axis set to 3.
void SetTickLocationToOutside(void)
vtkTextProperty * GetTitleTextProperty(int)
Returns the text property for the title on an axis.
vtkTextProperty * GetLabelTextProperty(int)
Returns the text property for the labels on an axis.
double ViewAngleLODThreshold
This determines at what view angle to geometry will make the geometry not visibile.
virtual int RenderTranslucentGeometry(vtkViewport *)
int EnableViewAngleLOD
If enabled the actor will not be visible at a certain view angle.
int YAxisMinorTickVisibility
represents an object (geometry & properties) in a rendered scene
vtkProperty * GetYAxesLinesProperty()
void ReleaseGraphicsResources(vtkWindow *)
Release any graphics resources that are being consumed by this actor.
a simple class to control print indentation
vtkProperty * YAxesGridpolysProperty
int FindFurtherstAxisIndex(double pts[8][3])
a virtual camera for 3D rendering
static void GetBoundsPoint(unsigned int pointIndex, const double bounds[6], double point[3])
Get a point on the bounding box by point index.
void UpdateLabels(vtkAxisActor **axis, int index)
void SetFlyModeToFurthestTriad()
vtkProperty * XAxesLinesProperty
void UpdateGridLineVisibility(int axisIndex)
This will Update AxisActors with GridVisibility when those should be dynamaic regarding the viewport.
vtkProperty * ZAxesLinesProperty
vtkProperty * YAxesGridlinesProperty
void SetLabelScaling(bool, int, int, int)
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
void SetTickLocationToInside(void)
virtual double * GetRenderedBounds()
abstract specification for Viewports
void SetYAxesLinesProperty(vtkProperty *)
void SetSaveTitlePosition(int val)
For 2D mode only: save axis title positions for later use.
represent text properties.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
void SetZAxesInnerGridlinesProperty(vtkProperty *)
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkProperty * ZAxesInnerGridlinesProperty
int HasTranslucentPolygonalGeometry()
Does this prop have some translucent polygonal geometry?
void SetFlyModeToOuterEdges()
vtkStringArray * GetAxisLabels(int axis)
Explicitly specify the axis labels along an axis as an array of strings instead of using the values.
vtkProperty * GetZAxesLinesProperty()
vtkProperty * YAxesLinesProperty
void SetLabelOffset(double offset)
Explicitly specify the distance between labels and the axis.
vtkProperty * GetYAxesInnerGridlinesProperty()
a vtkAbstractArray subclass for strings
virtual void GetRenderedBounds(double rBounds[6])
Method used to properly return the bounds of the cube axis itself with all its labels.
void SetXAxesGridpolysProperty(vtkProperty *)
Get/Set axes gridPolys actors properties.
represent surface properties of a geometric object
void FindBoundaryEdge(int &indexOfAxisX, int &indexOfAxisY, int &indexOfAxisZ, double pts[8][3])
void SetScreenSize(double screenSize)
Explicitly specify the screen size of title and label text.
double FSign(double, double)
void SetUse2DMode(int val)
Get/Set 2D mode NB: Use vtkTextActor for titles in 2D instead of vtkAxisFollower.
virtual void SetCamera(vtkCamera *)
Set/Get the camera to perform scaling and translation of the vtkCubeAxesActor.
vtkProperty * GetYAxesGridpolysProperty()
vtkProperty * GetZAxesGridpolysProperty()
void SetZAxesLinesProperty(vtkProperty *)
int CenterStickyAxes
Flag for centering sticky axes.
void SetFlyModeToStaticTriad()
int FindClosestAxisIndex(double pts[8][3])
int GetNumTicks(double range, double fxt)
vtkTimeStamp BuildTime
Updates the extensions string.
vtkProperty * XAxesGridpolysProperty
void SetXAxesInnerGridlinesProperty(vtkProperty *)
Get/Set axes inner gridlines actors properties.