76#ifndef vtkCubeAxesActor_h
77#define vtkCubeAxesActor_h
81#include "vtkRenderingAnnotationModule.h"
85VTK_ABI_NAMESPACE_BEGIN
153 vtkSetVector2Macro(XAxisRange,
double);
154 vtkSetVector2Macro(YAxisRange,
double);
155 vtkSetVector2Macro(ZAxisRange,
double);
156 vtkGetVector2Macro(XAxisRange,
double);
157 vtkGetVector2Macro(YAxisRange,
double);
168 vtkGetVector2Macro(ZAxisRange,
double);
178 vtkGetMacro(ScreenSize,
double);
187 vtkGetMacro(LabelOffset,
double);
196 vtkGetVector2Macro(TitleOffset,
double);
692 vtkViewport* viewport,
const double bounds[6],
double sphereCenter[3],
double& sphereRadius);
704 unsigned int pointIndex,
unsigned int& xBit,
unsigned int& yBit,
unsigned int& zBit);
709 static void GetBoundsPoint(
unsigned int pointIndex,
const double bounds[6],
double point[3]);
716 double MaxOf(
double,
double,
double,
double);
736 void FindBoundaryEdge(
int& indexOfAxisX,
int& indexOfAxisY,
int& indexOfAxisZ,
double pts[8][3]);
888 vtkSetStringMacro(ActualXLabel);
889 vtkSetStringMacro(ActualYLabel);
890 vtkSetStringMacro(ActualZLabel);
893 bool LastUseOrientedBounds =
false;
902 bool AutoLabelScaling =
true;
904 int LastXAxisDigits = 3;
905 int LastYAxisDigits = 3;
906 int LastZAxisDigits = 3;
914 int LastFlyMode = -1;
916 int RenderAxesX[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
917 int RenderAxesY[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
918 int RenderAxesZ[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
920 int NumberOfAxesX = 1;
921 int NumberOfAxesY = 1;
922 int NumberOfAxesZ = 1;
924 bool MustAdjustXValue =
false;
925 bool MustAdjustYValue =
false;
926 bool MustAdjustZValue =
false;
928 bool ForceXLabelReset =
false;
929 bool ForceYLabelReset =
false;
930 bool ForceZLabelReset =
false;
936 double LabelScale = -1.0;
937 double TitleScale = -1.0;
939 double ScreenSize = 10.0;
940 double LabelOffset = 20.0;
941 double TitleOffset[2] = { 20.0, 20.0 };
948 double MajorStart[3] = { 0.0, 0.0, 0.0 };
949 double DeltaMajor[3] = { 0.0, 0.0, 0.0 };
952 int RenderGeometry(
bool& initialRender, vtkViewport* viewport,
bool checkAxisVisibility,
953 int (vtkAxisActor::*renderMethod)(vtkViewport*));
955 void TransformBounds(vtkViewport* viewport,
const double bounds[6],
double pts[8][3]);
956 void AdjustAxes(
double bounds[6],
double xCoords[NUMBER_OF_ALIGNED_AXIS][6],
957 double yCoords[NUMBER_OF_ALIGNED_AXIS][6],
double zCoords[NUMBER_OF_ALIGNED_AXIS][6],
958 double xRange[2],
double yRange[2],
double zRange[2]);
960 bool ComputeTickSize(
double bounds[6]);
961 void AdjustValues(
const double xRange[2],
const double yRange[2],
const double zRange[2]);
962 void AdjustRange(
const double bounds[6]);
963 void BuildAxes(vtkViewport*);
964 void DetermineRenderAxes(vtkViewport*);
965 void SetNonDependentAttributes();
966 void BuildLabels(vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS]);
967 void AdjustTicksComputeRange(
968 vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS],
double rangeMin,
double rangeMax);
970 void AutoScale(vtkViewport* viewport);
971 void AutoScale(vtkViewport* viewport, vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS]);
972 double AutoScale(vtkViewport* viewport,
double screenSize,
double position[3]);
double * GetBounds() override
Return a reference to the Prop3D's composite transform.
Create an axis with tick marks and labels.
a virtual camera for 3D rendering
create a plot of a bounding box edges - used for navigation
void FindBoundaryEdge(int &indexOfAxisX, int &indexOfAxisY, int &indexOfAxisZ, double pts[8][3])
vtkProperty * GetZAxesGridpolysProperty()
Get/Set axes gridPolys actors properties.
void SetYAxesTitleProperty(vtkTextProperty *)
Returns the text property for the title on an axis.
bool GetUseTextActor3D()
Use or not vtkTextActor3D for titles and labels.
void SetXAxesGridlinesProperty(vtkProperty *)
Get/Set axes (outer) gridlines actors properties.
void GetViewportLimitedBounds(vtkViewport *viewport, double bounds[6])
Get bounds such that the axes are entirely within a viewport.
vtkCamera * GetCamera()
Set/Get the camera to perform scaling and translation of the vtkCubeAxesActor.
void UpdateGridLineVisibility(int axisIndex)
This will Update AxisActors with GridVisibility when those should be dynamaic regarding the viewport.
void SetScreenSize(double screenSize)
Explicitly specify the screen size of title and label text.
int RenderOverlay(vtkViewport *) override
Draw the axes as per the vtkProp superclass' API.
vtkNew< vtkProperty > ZAxesGridlinesProperty
virtual int RenderTranslucentGeometry(vtkViewport *)
Draw the axes as per the vtkProp superclass' API.
double FSign(double, double)
vtkTextProperty * GetXAxesLabelProperty()
Returns the text property for the labels on an axis.
void SetYAxesInnerGridlinesProperty(vtkProperty *)
Get/Set axes inner gridlines actors properties.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
bool XAxisLabelVisibility
vtkNew< vtkTextProperty > LabelTextProperty[3]
vtkSmartPointer< vtkCamera > Camera
void SetZAxesLabelProperty(vtkTextProperty *)
Returns the text property for the labels on an axis.
vtkProperty * GetZAxesGridlinesProperty()
Get/Set axes (outer) gridlines actors properties.
void SetTitleOffset(double titleOffset[2])
Explicitly specify the offset between title and labels.
void SetFlyModeToOuterEdges()
Specify a mode to control how the axes are drawn: either static, closest triad, furthest triad or out...
vtkTypeBool HasTranslucentPolygonalGeometry() override
Draw the axes as per the vtkProp superclass' API.
vtkProperty * GetXAxesLinesProperty()
Get/Set axes actors properties.
vtkTextProperty * GetYAxesLabelProperty()
Returns the text property for the labels on an axis.
vtkProperty * GetXAxesInnerGridlinesProperty()
Get/Set axes inner gridlines actors properties.
vtkNew< vtkTextProperty > TitleTextProperty[3]
void SetXAxesGridpolysProperty(vtkProperty *)
Get/Set axes gridPolys actors properties.
vtkNew< vtkProperty > ZAxesInnerGridlinesProperty
void SetZAxesGridpolysProperty(vtkProperty *)
Get/Set axes gridPolys actors properties.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetYAxesLabelProperty(vtkTextProperty *)
Returns the text property for the labels on an axis.
void SetUse2DMode(bool enable)
Get/Set 2D mode NB: Use vtkTextActor for titles in 2D instead of vtkAxisFollower.
vtkNew< vtkProperty > YAxesGridpolysProperty
vtkTextProperty * GetZAxesLabelProperty()
Returns the text property for the labels on an axis.
double * GetBounds() override
Explicitly specify the region in space around which to draw the bounds.
void SetFlyModeToClosestTriad()
Specify a mode to control how the axes are drawn: either static, closest triad, furthest triad or out...
void SetYAxesGridpolysProperty(vtkProperty *)
Get/Set axes gridPolys actors properties.
bool XAxisMinorTickVisibility
vtkNew< vtkProperty > XAxesGridlinesProperty
void SetZAxesInnerGridlinesProperty(vtkProperty *)
Get/Set axes inner gridlines actors properties.
void SetZAxesGridlinesProperty(vtkProperty *)
Get/Set axes (outer) gridlines actors properties.
@ VTK_GRID_LINES_FURTHEST
double ViewAngleLODThreshold
This determines at what view angle to geometry will make the geometry not visible.
~vtkCubeAxesActor() override
void SetAxisLabels(int axis, vtkStringArray *value)
Explicitly specify the axis labels along an axis as an array of strings instead of using the values.
vtkNew< vtkProperty > YAxesGridlinesProperty
static vtkCubeAxesActor * New()
Instantiate object with label format "6.3g" and the number of labels per axis set to 3.
bool YAxisMinorTickVisibility
bool EnableViewAngleLOD
If enabled the actor will not be visible at a certain view angle.
int FindClosestAxisIndex(double pts[8][3])
int RenderOpaqueGeometry(vtkViewport *) override
Draw the axes as per the vtkProp superclass' API.
vtkAxisActor * YAxes[NUMBER_OF_ALIGNED_AXIS]
Control variables for all axes NB: [0] always for 'Major' axis during non-static fly modes.
void ComputeStickyAxesBoundingSphere(vtkViewport *viewport, const double bounds[6], double sphereCenter[3], double &sphereRadius)
Computes a bounding sphere used to determine the sticky bounding box.
vtkTextProperty * GetZAxesTitleProperty()
Returns the text property for the title on an axis.
static void GetBoundsPoint(unsigned int pointIndex, const double bounds[6], double point[3])
Get a point on the bounding box by point index.
vtkTextProperty * GetYAxesTitleProperty()
Returns the text property for the title on an axis.
void SetTickLocationToBoth()
void SetLabelOffset(double offset)
Explicitly specify the offset between labels and the axis.
bool GetUse2DMode()
Get/Set 2D mode NB: Use vtkTextActor for titles in 2D instead of vtkAxisFollower.
void SetUseTextActor3D(bool enable)
Use or not vtkTextActor3D for titles and labels.
vtkProperty * GetXAxesGridlinesProperty()
Get/Set axes (outer) gridlines actors properties.
void SetTickLocationToOutside()
vtkAxisActor * ZAxes[NUMBER_OF_ALIGNED_AXIS]
Control variables for all axes NB: [0] always for 'Major' axis during non-static fly modes.
vtkTextProperty * GetLabelTextProperty(int)
Returns the text property for the labels on an axis.
void SetZAxesLinesProperty(vtkProperty *)
Get/Set axes actors properties.
void SetFlyModeToStaticEdges()
Specify a mode to control how the axes are drawn: either static, closest triad, furthest triad or out...
vtkSmartPointer< vtkStringArray > AxisLabels[3]
void SetFlyModeToStaticTriad()
Specify a mode to control how the axes are drawn: either static, closest triad, furthest triad or out...
void SetYAxesLinesProperty(vtkProperty *)
Get/Set axes actors properties.
vtkStringArray * GetAxisLabels(int axis)
Explicitly specify the axis labels along an axis as an array of strings instead of using the values.
vtkNew< vtkProperty > XAxesGridpolysProperty
virtual double * GetRenderedBounds()
Method used to properly return the bounds of the cube axis itself with all its labels.
bool ZAxisLabelVisibility
vtkProperty * GetYAxesGridlinesProperty()
Get/Set axes (outer) gridlines actors properties.
vtkProperty * GetZAxesLinesProperty()
Get/Set axes actors properties.
vtkNew< vtkProperty > YAxesInnerGridlinesProperty
void SetSaveTitlePosition(int val)
For 2D mode only: save axis title positions for later use.
vtkNew< vtkProperty > ZAxesLinesProperty
vtkAxisActor * XAxes[NUMBER_OF_ALIGNED_AXIS]
Control variables for all axes NB: [0] always for 'Major' axis during non-static fly modes.
vtkTextProperty * GetTitleTextProperty(int)
Returns the text property for the title on an axis.
bool StickyAxes
Flag for axes stickiness.
static void GetBoundsPointBits(unsigned int pointIndex, unsigned int &xBit, unsigned int &yBit, unsigned int &zBit)
Get the bits for a bounds point.
void SetXAxesInnerGridlinesProperty(vtkProperty *)
Get/Set axes inner gridlines actors properties.
void SetLabelScaling(bool, int, int, int)
vtkNew< vtkProperty > YAxesLinesProperty
vtkTextProperty * GetXAxesTitleProperty()
Returns the text property for the title on an axis.
vtkNew< vtkProperty > XAxesLinesProperty
bool ZAxisMinorTickVisibility
int FindFurtherstAxisIndex(double pts[8][3])
vtkNew< vtkProperty > XAxesInnerGridlinesProperty
vtkProperty * GetXAxesGridpolysProperty()
Get/Set axes gridPolys actors properties.
void SetXAxesTitleProperty(vtkTextProperty *)
Returns the text property for the title on an axis.
vtkNew< vtkProperty > ZAxesGridpolysProperty
double MaxOf(double, double, double, double)
int GetNumTicks(double range, double fxt)
void SetXAxesLabelProperty(vtkTextProperty *)
Returns the text property for the labels on an axis.
void UpdateLabels(vtkAxisActor **axis, int index)
vtkProperty * GetYAxesInnerGridlinesProperty()
Get/Set axes inner gridlines actors properties.
int Digits(double min, double max)
bool EnableDistanceLOD
If enabled the actor will not be visible at a certain distance from the camera.
bool CenterStickyAxes
Flag for centering sticky axes.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the axes as per the vtkProp superclass' API.
vtkProperty * GetZAxesInnerGridlinesProperty()
Get/Set axes inner gridlines actors properties.
virtual void SetFlyMode(int)
Specify a mode to control how the axes are drawn: either static, closest triad, furthest triad or out...
virtual void SetCamera(vtkCamera *)
Set/Get the camera to perform scaling and translation of the vtkCubeAxesActor.
virtual void GetRenderedBounds(double rBounds[6])
Method used to properly return the bounds of the cube axis itself with all its labels.
double MaxOf(double, double)
void SetTickLocationToInside()
vtkProperty * GetYAxesLinesProperty()
Get/Set axes actors properties.
int LabelExponent(double min, double max)
void SetXAxesLinesProperty(vtkProperty *)
Get/Set axes actors properties.
void SetYAxesGridlinesProperty(vtkProperty *)
Get/Set axes (outer) gridlines actors properties.
vtkProperty * GetYAxesGridpolysProperty()
Get/Set axes gridPolys actors properties.
bool YAxisLabelVisibility
virtual void SetTickLocation(int)
Set/Get the location of ticks marks.
void SetZAxesTitleProperty(vtkTextProperty *)
Returns the text property for the title on an axis.
void SetFlyModeToFurthestTriad()
Specify a mode to control how the axes are drawn: either static, closest triad, furthest triad or out...
double DistanceLODThreshold
Default is 0.80 This determines at what fraction of camera far clip range, actor is not visible.
a simple class to control print indentation
Allocate and hold a VTK object.
represent surface properties of a geometric object
Hold a reference to a vtkObjectBase instance.
a vtkAbstractArray subclass for strings
represent text properties.
record modification and/or execution time
abstract specification for Viewports
window superclass for vtkRenderWindow
#define VTK_SIZEHINT(...)