VTK  9.3.0
vtkCubeAxesActor.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
47#ifndef vtkCubeAxesActor_h
48#define vtkCubeAxesActor_h
49
50#include "vtkActor.h"
51#include "vtkDeprecation.h" // For deprecation macro
52#include "vtkNew.h" // For vtkNew
53#include "vtkRenderingAnnotationModule.h" // For export macro
54#include "vtkSmartPointer.h" // For vtkSmartPointer
55
56VTK_ABI_NAMESPACE_BEGIN
57class vtkAxisActor;
58class vtkCamera;
59class vtkTextProperty;
60class vtkStringArray;
61
62class VTKRENDERINGANNOTATION_EXPORT vtkCubeAxesActor : public vtkActor
63{
64public:
65 vtkTypeMacro(vtkCubeAxesActor, vtkActor);
66 void PrintSelf(ostream& os, vtkIndent indent) override;
67
73
75
81 int RenderOverlay(vtkViewport*) override;
84
86
90 vtkSetMacro(RebuildAxes, bool);
91 vtkGetMacro(RebuildAxes, bool);
93
95
101 vtkSetVector6Macro(Bounds, double);
102 using Superclass::GetBounds;
103 double* GetBounds() VTK_SIZEHINT(6) override { return this->Bounds; }
105
107
111 virtual void GetRenderedBounds(double rBounds[6]);
112 virtual double* GetRenderedBounds();
114
116
124 vtkSetVector2Macro(XAxisRange, double);
125 vtkSetVector2Macro(YAxisRange, double);
126 vtkSetVector2Macro(ZAxisRange, double);
127 vtkGetVector2Macro(XAxisRange, double);
128 vtkGetVector2Macro(YAxisRange, double);
131
136 void SetAxisLabels(int axis, vtkStringArray* value);
138
139 vtkGetVector2Macro(ZAxisRange, double);
140
142
148 void SetScreenSize(double screenSize);
149 vtkGetMacro(ScreenSize, double);
151
153
157 void SetLabelOffset(double offset);
158 vtkGetMacro(LabelOffset, double);
160
162
166 VTK_DEPRECATED_IN_9_3_0("Use the new setters as it's now a 2d vector")
167 void SetTitleOffset(double titleOffsetY);
168 VTK_DEPRECATED_IN_9_3_0("Use the new getter as it's now a 2d vector")
169 double GetTitleOffset();
170 void SetTitleOffset(double titleOffset[2]);
171 // TODO: Replace getter with macro once deprecated one is removed
172 void GetTitleOffset(double& titleOffsetX, double& titleOffsetY);
174
176
180 virtual void SetCamera(vtkCamera*);
181 vtkCamera* GetCamera();
183
185 {
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
191 };
192
194
200 vtkSetClampMacro(FlyMode, int, VTK_FLY_OUTER_EDGES, VTK_FLY_STATIC_EDGES);
201 vtkGetMacro(FlyMode, int);
202 void SetFlyModeToOuterEdges() { this->SetFlyMode(VTK_FLY_OUTER_EDGES); }
203 void SetFlyModeToClosestTriad() { this->SetFlyMode(VTK_FLY_CLOSEST_TRIAD); }
204 void SetFlyModeToFurthestTriad() { this->SetFlyMode(VTK_FLY_FURTHEST_TRIAD); }
205 void SetFlyModeToStaticTriad() { this->SetFlyMode(VTK_FLY_STATIC_TRIAD); }
206 void SetFlyModeToStaticEdges() { this->SetFlyMode(VTK_FLY_STATIC_EDGES); }
208
210
214 vtkSetStringMacro(XTitle);
215 vtkGetStringMacro(XTitle);
216 vtkSetStringMacro(XUnits);
217 vtkGetStringMacro(XUnits);
218 vtkSetStringMacro(YTitle);
219 vtkGetStringMacro(YTitle);
220 vtkSetStringMacro(YUnits);
221 vtkGetStringMacro(YUnits);
222 vtkSetStringMacro(ZTitle);
223 vtkGetStringMacro(ZTitle);
224 vtkSetStringMacro(ZUnits);
225 vtkGetStringMacro(ZUnits);
227
229
233 vtkSetStringMacro(XLabelFormat);
234 vtkGetStringMacro(XLabelFormat);
235 vtkSetStringMacro(YLabelFormat);
236 vtkGetStringMacro(YLabelFormat);
237 vtkSetStringMacro(ZLabelFormat);
238 vtkGetStringMacro(ZLabelFormat);
240
242
248 vtkSetClampMacro(Inertia, int, 1, VTK_INT_MAX);
249 vtkGetMacro(Inertia, int);
251
253
259 vtkSetMacro(CornerOffset, double);
260 vtkGetMacro(CornerOffset, double);
262
269
271
275 vtkSetMacro(EnableDistanceLOD, bool);
276 vtkGetMacro(EnableDistanceLOD, bool);
278
280
284 vtkSetClampMacro(DistanceLODThreshold, double, 0.0, 1.0);
285 vtkGetMacro(DistanceLODThreshold, double);
287
289
293 vtkSetMacro(EnableViewAngleLOD, bool);
294 vtkGetMacro(EnableViewAngleLOD, bool);
296
298
302 vtkSetClampMacro(ViewAngleLODThreshold, double, 0., 1.);
303 vtkGetMacro(ViewAngleLODThreshold, double);
305
307
311 vtkSetMacro(XAxisVisibility, bool);
312 vtkGetMacro(XAxisVisibility, bool);
313 vtkBooleanMacro(XAxisVisibility, bool);
314
315 vtkSetMacro(YAxisVisibility, bool);
316 vtkGetMacro(YAxisVisibility, bool);
317 vtkBooleanMacro(YAxisVisibility, bool);
318
319 vtkSetMacro(ZAxisVisibility, bool);
320 vtkGetMacro(ZAxisVisibility, bool);
321 vtkBooleanMacro(ZAxisVisibility, bool);
323
325
329 vtkSetMacro(XAxisLabelVisibility, bool);
330 vtkGetMacro(XAxisLabelVisibility, bool);
331 vtkBooleanMacro(XAxisLabelVisibility, bool);
332
333 vtkSetMacro(YAxisLabelVisibility, bool);
334 vtkGetMacro(YAxisLabelVisibility, bool);
335 vtkBooleanMacro(YAxisLabelVisibility, bool);
336
337 vtkSetMacro(ZAxisLabelVisibility, bool);
338 vtkGetMacro(ZAxisLabelVisibility, bool);
339 vtkBooleanMacro(ZAxisLabelVisibility, bool);
341
343
347 vtkSetMacro(XAxisTickVisibility, bool);
348 vtkGetMacro(XAxisTickVisibility, bool);
349 vtkBooleanMacro(XAxisTickVisibility, bool);
350
351 vtkSetMacro(YAxisTickVisibility, bool);
352 vtkGetMacro(YAxisTickVisibility, bool);
353 vtkBooleanMacro(YAxisTickVisibility, bool);
354
355 vtkSetMacro(ZAxisTickVisibility, bool);
356 vtkGetMacro(ZAxisTickVisibility, bool);
357 vtkBooleanMacro(ZAxisTickVisibility, bool);
359
361
365 vtkSetMacro(XAxisMinorTickVisibility, bool);
366 vtkGetMacro(XAxisMinorTickVisibility, bool);
367 vtkBooleanMacro(XAxisMinorTickVisibility, bool);
368
369 vtkSetMacro(YAxisMinorTickVisibility, bool);
370 vtkGetMacro(YAxisMinorTickVisibility, bool);
371 vtkBooleanMacro(YAxisMinorTickVisibility, bool);
372
373 vtkSetMacro(ZAxisMinorTickVisibility, bool);
374 vtkGetMacro(ZAxisMinorTickVisibility, bool);
375 vtkBooleanMacro(ZAxisMinorTickVisibility, bool);
377
379
383 vtkSetMacro(DrawXGridlines, bool);
384 vtkGetMacro(DrawXGridlines, bool);
385 vtkBooleanMacro(DrawXGridlines, bool);
386
387 vtkSetMacro(DrawYGridlines, bool);
388 vtkGetMacro(DrawYGridlines, bool);
389 vtkBooleanMacro(DrawYGridlines, bool);
390
391 vtkSetMacro(DrawZGridlines, bool);
392 vtkGetMacro(DrawZGridlines, bool);
393 vtkBooleanMacro(DrawZGridlines, bool);
395
397
401 vtkSetMacro(DrawXInnerGridlines, bool);
402 vtkGetMacro(DrawXInnerGridlines, bool);
403 vtkBooleanMacro(DrawXInnerGridlines, bool);
404
405 vtkSetMacro(DrawYInnerGridlines, bool);
406 vtkGetMacro(DrawYInnerGridlines, bool);
407 vtkBooleanMacro(DrawYInnerGridlines, bool);
408
409 vtkSetMacro(DrawZInnerGridlines, bool);
410 vtkGetMacro(DrawZInnerGridlines, bool);
411 vtkBooleanMacro(DrawZInnerGridlines, bool);
413
415
419 vtkSetMacro(DrawXGridpolys, bool);
420 vtkGetMacro(DrawXGridpolys, bool);
421 vtkBooleanMacro(DrawXGridpolys, bool);
422
423 vtkSetMacro(DrawYGridpolys, bool);
424 vtkGetMacro(DrawYGridpolys, bool);
425 vtkBooleanMacro(DrawYGridpolys, bool);
426
427 vtkSetMacro(DrawZGridpolys, bool);
428 vtkGetMacro(DrawZGridpolys, bool);
429 vtkBooleanMacro(DrawZGridpolys, bool);
431
436
441
443
453
455
465
467
477
479
489
491 {
492 VTK_TICKS_INSIDE = 0,
493 VTK_TICKS_OUTSIDE = 1,
494 VTK_TICKS_BOTH = 2
495 };
496
498
502 vtkSetClampMacro(TickLocation, int, VTK_TICKS_INSIDE, VTK_TICKS_BOTH);
503 vtkGetMacro(TickLocation, int);
505
506 void SetTickLocationToInside() { this->SetTickLocation(VTK_TICKS_INSIDE); }
507 void SetTickLocationToOutside() { this->SetTickLocation(VTK_TICKS_OUTSIDE); }
508 void SetTickLocationToBoth() { this->SetTickLocation(VTK_TICKS_BOTH); }
509
510 void SetLabelScaling(bool, int, int, int);
511
513
518 void SetUseTextActor3D(bool enable);
521
523
527 void SetUse2DMode(bool enable);
530
534 void SetSaveTitlePosition(int val);
535
537
541 vtkSetVector6Macro(OrientedBounds, double);
542 vtkGetVector6Macro(OrientedBounds, double);
544
546
550 vtkSetMacro(UseOrientedBounds, bool);
551 vtkGetMacro(UseOrientedBounds, bool);
553
555
559 vtkSetVector3Macro(AxisBaseForX, double);
560 vtkGetVector3Macro(AxisBaseForX, double);
562
564
568 vtkSetVector3Macro(AxisBaseForY, double);
569 vtkGetVector3Macro(AxisBaseForY, double);
571
573
577 vtkSetVector3Macro(AxisBaseForZ, double);
578 vtkGetVector3Macro(AxisBaseForZ, double);
580
582
587 vtkSetVector3Macro(AxisOrigin, double);
588 vtkGetVector3Macro(AxisOrigin, double);
590
592
596 vtkSetMacro(UseAxisOrigin, bool);
597 vtkGetMacro(UseAxisOrigin, bool);
599
601
605 vtkSetMacro(GridLineLocation, int);
606 vtkGetMacro(GridLineLocation, int);
608
610
616 vtkSetMacro(StickyAxes, bool);
617 vtkGetMacro(StickyAxes, bool);
618 vtkBooleanMacro(StickyAxes, bool);
620
622
630 vtkSetMacro(CenterStickyAxes, bool);
631 vtkGetMacro(CenterStickyAxes, bool);
632 vtkBooleanMacro(CenterStickyAxes, bool);
634
636 {
637 VTK_GRID_LINES_ALL = 0,
638 VTK_GRID_LINES_CLOSEST = 1,
639 VTK_GRID_LINES_FURTHEST = 2
640 };
641
642protected:
645
652 vtkViewport* viewport, const double bounds[6], double sphereCenter[3], double& sphereRadius);
653
657 void GetViewportLimitedBounds(vtkViewport* viewport, double bounds[6]);
658
664 unsigned int pointIndex, unsigned int& xBit, unsigned int& yBit, unsigned int& zBit);
665
669 static void GetBoundsPoint(unsigned int pointIndex, const double bounds[6], double point[3]);
670
671 int LabelExponent(double min, double max);
672
673 int Digits(double min, double max);
674
675 double MaxOf(double, double);
676 double MaxOf(double, double, double, double);
677
678 double FFix(double);
679 double FSign(double, double);
680 int FRound(double fnt);
681 int GetNumTicks(double range, double fxt);
682
683 void UpdateLabels(vtkAxisActor** axis, int index);
684
686
687 int FlyMode = VTK_FLY_CLOSEST_TRIAD;
688
689 // Expose internally closest axis index computation
690 int FindClosestAxisIndex(double pts[8][3]);
691
692 // Expose internally furthest axis index computation
693 int FindFurtherstAxisIndex(double pts[8][3]);
694
695 // Expose internally the boundary edge fly mode axis index computation
696 void FindBoundaryEdge(int& indexOfAxisX, int& indexOfAxisY, int& indexOfAxisZ, double pts[8][3]);
697
703 void UpdateGridLineVisibility(int axisIndex);
704
705 // VTK_ALL_GRID_LINES 0
706 // VTK_CLOSEST_GRID_LINES 1
707 // VTK_FURTHEST_GRID_LINES 2
708 int GridLineLocation = VTK_GRID_LINES_ALL;
709
713 bool StickyAxes = false;
714
718 bool CenterStickyAxes = true;
719
724 bool EnableDistanceLOD = true;
725
730 double DistanceLODThreshold = 0.8;
731
736 bool EnableViewAngleLOD = true;
737
742 double ViewAngleLODThreshold = 0.2;
743
745 {
746 NUMBER_OF_ALIGNED_AXIS = 4
747 };
748
750
754 vtkAxisActor* XAxes[NUMBER_OF_ALIGNED_AXIS];
755 vtkAxisActor* YAxes[NUMBER_OF_ALIGNED_AXIS];
756 vtkAxisActor* ZAxes[NUMBER_OF_ALIGNED_AXIS];
758
759 bool RebuildAxes = true;
760
761 char* XTitle = nullptr;
762 char* XUnits = nullptr;
763 char* YTitle = nullptr;
764 char* YUnits = nullptr;
765 char* ZTitle = nullptr;
766 char* ZUnits = nullptr;
767
768 char* ActualXLabel = nullptr;
769 char* ActualYLabel = nullptr;
770 char* ActualZLabel = nullptr;
771
772 int TickLocation = VTK_TICKS_INSIDE;
773
774 bool XAxisVisibility = true;
775 bool YAxisVisibility = true;
776 bool ZAxisVisibility = true;
777
778 bool XAxisTickVisibility = true;
779 bool YAxisTickVisibility = true;
780 bool ZAxisTickVisibility = true;
781
782 bool XAxisMinorTickVisibility = true;
783 bool YAxisMinorTickVisibility = true;
784 bool ZAxisMinorTickVisibility = true;
785
786 bool XAxisLabelVisibility = true;
787 bool YAxisLabelVisibility = true;
788 bool ZAxisLabelVisibility = true;
789
790 bool DrawXGridlines = false;
791 bool DrawYGridlines = false;
792 bool DrawZGridlines = false;
793
794 bool DrawXInnerGridlines = false;
795 bool DrawYInnerGridlines = false;
796 bool DrawZInnerGridlines = false;
797
798 bool DrawXGridpolys = false;
799 bool DrawYGridpolys = false;
800 bool DrawZGridpolys = false;
801
802 char* XLabelFormat = nullptr;
803 char* YLabelFormat = nullptr;
804 char* ZLabelFormat = nullptr;
805
806 double CornerOffset = 0.0;
807
808 int Inertia = 1;
809
810 int RenderCount = 0;
811
812 int InertiaLocs[3] = { -1, -1, -1 };
813
814 bool RenderSomething = false;
815
816 vtkNew<vtkTextProperty> TitleTextProperty[3];
818 vtkNew<vtkTextProperty> LabelTextProperty[3];
819
832
833 double RenderedBounds[6] = { -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 };
834 double OrientedBounds[6] = { -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 };
835 bool UseOrientedBounds = false;
836
837 double AxisOrigin[3] = { 0.0, 0.0, 0.0 };
838 bool UseAxisOrigin = false;
839
840 double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
841 double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
842 double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
843
844private:
845 vtkCubeAxesActor(const vtkCubeAxesActor&) = delete;
846 void operator=(const vtkCubeAxesActor&) = delete;
847
848 vtkSetStringMacro(ActualXLabel);
849 vtkSetStringMacro(ActualYLabel);
850 vtkSetStringMacro(ActualZLabel);
851
852 vtkTimeStamp BuildTime;
853 bool LastUseOrientedBounds = false;
854 int LastXPow = 0;
855 int LastYPow = 0;
856 int LastZPow = 0;
857
858 int UserXPow = 0;
859 int UserYPow = 0;
860 int UserZPow = 0;
861
862 bool AutoLabelScaling = true;
863
864 int LastXAxisDigits = 3;
865 int LastYAxisDigits = 3;
866 int LastZAxisDigits = 3;
867
868 double LastXRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
869 double LastYRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
870 double LastZRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
873
874 int LastFlyMode = -1;
875
876 int RenderAxesX[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
877 int RenderAxesY[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
878 int RenderAxesZ[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
879
880 int NumberOfAxesX = 1;
881 int NumberOfAxesY = 1;
882 int NumberOfAxesZ = 1;
883
884 bool MustAdjustXValue = false;
885 bool MustAdjustYValue = false;
886 bool MustAdjustZValue = false;
887
888 bool ForceXLabelReset = false;
889 bool ForceYLabelReset = false;
890 bool ForceZLabelReset = false;
891
892 double XAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
893 double YAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
894 double ZAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
895
896 double LabelScale = -1.0;
897 double TitleScale = -1.0;
898
899 double ScreenSize = 10.0;
900 double LabelOffset = 20.0;
901 double TitleOffset[2] = { 20.0, 20.0 };
902
904
908 double MajorStart[3] = { 0.0, 0.0, 0.0 };
909 double DeltaMajor[3] = { 0.0, 0.0, 0.0 };
911
912 int RenderGeometry(bool& initialRender, vtkViewport* viewport, bool checkAxisVisibility,
913 int (vtkAxisActor::*renderMethod)(vtkViewport*));
914
915 void TransformBounds(vtkViewport* viewport, const double bounds[6], double pts[8][3]);
916 void AdjustAxes(double bounds[6], double xCoords[NUMBER_OF_ALIGNED_AXIS][6],
917 double yCoords[NUMBER_OF_ALIGNED_AXIS][6], double zCoords[NUMBER_OF_ALIGNED_AXIS][6],
918 double xRange[2], double yRange[2], double zRange[2]);
919
920 bool ComputeTickSize(double bounds[6]);
921 void AdjustValues(const double xRange[2], const double yRange[2], const double zRange[2]);
922 void AdjustRange(const double bounds[6]);
923 void BuildAxes(vtkViewport*);
924 void DetermineRenderAxes(vtkViewport*);
925 void SetNonDependentAttributes();
926 void BuildLabels(vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS]);
927 void AdjustTicksComputeRange(
928 vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS], double rangeMin, double rangeMax);
929
930 void AutoScale(vtkViewport* viewport);
931 void AutoScale(vtkViewport* viewport, vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS]);
932 double AutoScale(vtkViewport* viewport, double screenSize, double position[3]);
933};
934
935VTK_ABI_NAMESPACE_END
936#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:41
Create an axis with tick marks and labels.
a virtual camera for 3D rendering
Definition vtkCamera.h:41
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.
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.
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)
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.
vtkSmartPointer< vtkCamera > Camera
vtkProperty * GetZAxesGridlinesProperty()
Get/Set axes (outer) gridlines actors properties.
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.
vtkProperty * GetXAxesInnerGridlinesProperty()
Get/Set axes inner gridlines actors properties.
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 SetUse2DMode(bool enable)
Get/Set 2D mode NB: Use vtkTextActor for titles in 2D instead of vtkAxisFollower.
vtkNew< vtkProperty > YAxesGridpolysProperty
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.
vtkNew< vtkProperty > XAxesGridlinesProperty
void SetZAxesInnerGridlinesProperty(vtkProperty *)
Get/Set axes inner gridlines actors properties.
void SetZAxesGridlinesProperty(vtkProperty *)
Get/Set axes (outer) gridlines actors properties.
~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.
int FRound(double fnt)
int FindClosestAxisIndex(double pts[8][3])
int RenderOpaqueGeometry(vtkViewport *) override
Draw the axes as per the vtkProp superclass' API.
void ComputeStickyAxesBoundingSphere(vtkViewport *viewport, const double bounds[6], double sphereCenter[3], double &sphereRadius)
Computes a bounding sphere used to determine the sticky bounding box.
static void GetBoundsPoint(unsigned int pointIndex, const double bounds[6], double point[3])
Get a point on the bounding box by point index.
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.
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...
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.
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
vtkTextProperty * GetTitleTextProperty(int)
Returns the text property for the title on an axis.
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
vtkNew< vtkProperty > XAxesLinesProperty
double FFix(double)
int FindFurtherstAxisIndex(double pts[8][3])
vtkNew< vtkProperty > XAxesInnerGridlinesProperty
vtkProperty * GetXAxesGridpolysProperty()
Get/Set axes gridPolys actors properties.
vtkNew< vtkProperty > ZAxesGridpolysProperty
double MaxOf(double, double, double, double)
int GetNumTicks(double range, double fxt)
void UpdateLabels(vtkAxisActor **axis, int index)
vtkProperty * GetYAxesInnerGridlinesProperty()
Get/Set axes inner gridlines actors properties.
int Digits(double min, double max)
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the axes as per the vtkProp superclass' API.
vtkProperty * GetZAxesInnerGridlinesProperty()
Get/Set axes inner gridlines actors properties.
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)
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.
void SetFlyModeToFurthestTriad()
Specify a mode to control how the axes are drawn: either static, closest triad, furthest triad or out...
a simple class to control print indentation
Definition vtkIndent.h:29
Allocate and hold a VTK object.
Definition vtkNew.h:51
double Bounds[6]
Definition vtkProp3D.h:397
represent surface properties of a geometric object
Definition vtkProperty.h:57
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
Definition vtkViewport.h:45
window superclass for vtkRenderWindow
Definition vtkWindow.h:25
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_3_0(reason)
#define VTK_DOUBLE_MAX
Definition vtkType.h:154
#define VTK_INT_MAX
Definition vtkType.h:144
#define VTK_SIZEHINT(...)
#define max(a, b)