VTK  9.3.20240419
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
76 #ifndef vtkCubeAxesActor_h
77 #define vtkCubeAxesActor_h
78 
79 #include "vtkActor.h"
80 #include "vtkDeprecation.h" // For deprecation macro
81 #include "vtkNew.h" // For vtkNew
82 #include "vtkRenderingAnnotationModule.h" // For export macro
83 #include "vtkSmartPointer.h" // For vtkSmartPointer
84 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
85 
86 VTK_ABI_NAMESPACE_BEGIN
87 class vtkAxisActor;
88 class vtkCamera;
89 class vtkTextProperty;
90 class vtkStringArray;
91 
92 class VTKRENDERINGANNOTATION_EXPORT VTK_MARSHALAUTO vtkCubeAxesActor : public vtkActor
93 {
94 public:
95  vtkTypeMacro(vtkCubeAxesActor, vtkActor);
96  void PrintSelf(ostream& os, vtkIndent indent) override;
97 
103 
105 
111  int RenderOverlay(vtkViewport*) override;
114 
116 
120  vtkSetMacro(RebuildAxes, bool);
121  vtkGetMacro(RebuildAxes, bool);
123 
125 
131  vtkSetVector6Macro(Bounds, double);
132  using Superclass::GetBounds;
133  double* GetBounds() VTK_SIZEHINT(6) override { return this->Bounds; }
135 
137 
141  virtual void GetRenderedBounds(double rBounds[6]);
142  virtual double* GetRenderedBounds();
144 
146 
154  vtkSetVector2Macro(XAxisRange, double);
155  vtkSetVector2Macro(YAxisRange, double);
156  vtkSetVector2Macro(ZAxisRange, double);
157  vtkGetVector2Macro(XAxisRange, double);
158  vtkGetVector2Macro(YAxisRange, double);
161 
168 
169  vtkGetVector2Macro(ZAxisRange, double);
170 
172 
178  void SetScreenSize(double screenSize);
179  vtkGetMacro(ScreenSize, double);
181 
183 
187  void SetLabelOffset(double offset);
188  vtkGetMacro(LabelOffset, double);
190 
192 
196  VTK_DEPRECATED_IN_9_3_0("Use the new setters as it's now a 2d vector")
197  void SetTitleOffset(double titleOffsetY);
198  VTK_DEPRECATED_IN_9_3_0("Use the new getter as it's now a 2d vector")
199  double GetTitleOffset();
200  void SetTitleOffset(double titleOffset[2]);
201  // TODO: Replace getter with macro once deprecated one is removed
202  void GetTitleOffset(double& titleOffsetX, double& titleOffsetY);
204 
206 
210  virtual void SetCamera(vtkCamera*);
211  vtkCamera* GetCamera();
213 
214  enum FlyMode
215  {
216  VTK_FLY_OUTER_EDGES = 0,
217  VTK_FLY_CLOSEST_TRIAD = 1,
218  VTK_FLY_FURTHEST_TRIAD = 2,
219  VTK_FLY_STATIC_TRIAD = 3,
220  VTK_FLY_STATIC_EDGES = 4
221  };
222 
224 
230  vtkSetClampMacro(FlyMode, int, VTK_FLY_OUTER_EDGES, VTK_FLY_STATIC_EDGES);
231  vtkGetMacro(FlyMode, int);
232  void SetFlyModeToOuterEdges() { this->SetFlyMode(VTK_FLY_OUTER_EDGES); }
233  void SetFlyModeToClosestTriad() { this->SetFlyMode(VTK_FLY_CLOSEST_TRIAD); }
234  void SetFlyModeToFurthestTriad() { this->SetFlyMode(VTK_FLY_FURTHEST_TRIAD); }
235  void SetFlyModeToStaticTriad() { this->SetFlyMode(VTK_FLY_STATIC_TRIAD); }
236  void SetFlyModeToStaticEdges() { this->SetFlyMode(VTK_FLY_STATIC_EDGES); }
238 
240 
244  vtkSetStringMacro(XTitle);
245  vtkGetStringMacro(XTitle);
246  vtkSetStringMacro(XUnits);
247  vtkGetStringMacro(XUnits);
248  vtkSetStringMacro(YTitle);
249  vtkGetStringMacro(YTitle);
250  vtkSetStringMacro(YUnits);
251  vtkGetStringMacro(YUnits);
252  vtkSetStringMacro(ZTitle);
253  vtkGetStringMacro(ZTitle);
254  vtkSetStringMacro(ZUnits);
255  vtkGetStringMacro(ZUnits);
257 
259 
263  vtkSetStringMacro(XLabelFormat);
264  vtkGetStringMacro(XLabelFormat);
265  vtkSetStringMacro(YLabelFormat);
266  vtkGetStringMacro(YLabelFormat);
267  vtkSetStringMacro(ZLabelFormat);
268  vtkGetStringMacro(ZLabelFormat);
270 
272 
278  vtkSetClampMacro(Inertia, int, 1, VTK_INT_MAX);
279  vtkGetMacro(Inertia, int);
281 
283 
289  vtkSetMacro(CornerOffset, double);
290  vtkGetMacro(CornerOffset, double);
292 
299 
301 
305  vtkSetMacro(EnableDistanceLOD, bool);
306  vtkGetMacro(EnableDistanceLOD, bool);
308 
310 
314  vtkSetClampMacro(DistanceLODThreshold, double, 0.0, 1.0);
315  vtkGetMacro(DistanceLODThreshold, double);
317 
319 
323  vtkSetMacro(EnableViewAngleLOD, bool);
324  vtkGetMacro(EnableViewAngleLOD, bool);
326 
328 
332  vtkSetClampMacro(ViewAngleLODThreshold, double, 0., 1.);
333  vtkGetMacro(ViewAngleLODThreshold, double);
335 
337 
341  vtkSetMacro(XAxisVisibility, bool);
342  vtkGetMacro(XAxisVisibility, bool);
343  vtkBooleanMacro(XAxisVisibility, bool);
344 
345  vtkSetMacro(YAxisVisibility, bool);
346  vtkGetMacro(YAxisVisibility, bool);
347  vtkBooleanMacro(YAxisVisibility, bool);
348 
349  vtkSetMacro(ZAxisVisibility, bool);
350  vtkGetMacro(ZAxisVisibility, bool);
351  vtkBooleanMacro(ZAxisVisibility, bool);
353 
355 
359  vtkSetMacro(XAxisLabelVisibility, bool);
360  vtkGetMacro(XAxisLabelVisibility, bool);
361  vtkBooleanMacro(XAxisLabelVisibility, bool);
362 
363  vtkSetMacro(YAxisLabelVisibility, bool);
364  vtkGetMacro(YAxisLabelVisibility, bool);
365  vtkBooleanMacro(YAxisLabelVisibility, bool);
366 
367  vtkSetMacro(ZAxisLabelVisibility, bool);
368  vtkGetMacro(ZAxisLabelVisibility, bool);
369  vtkBooleanMacro(ZAxisLabelVisibility, bool);
371 
373 
377  vtkSetMacro(XAxisTickVisibility, bool);
378  vtkGetMacro(XAxisTickVisibility, bool);
379  vtkBooleanMacro(XAxisTickVisibility, bool);
380 
381  vtkSetMacro(YAxisTickVisibility, bool);
382  vtkGetMacro(YAxisTickVisibility, bool);
383  vtkBooleanMacro(YAxisTickVisibility, bool);
384 
385  vtkSetMacro(ZAxisTickVisibility, bool);
386  vtkGetMacro(ZAxisTickVisibility, bool);
387  vtkBooleanMacro(ZAxisTickVisibility, bool);
389 
391 
395  vtkSetMacro(XAxisMinorTickVisibility, bool);
396  vtkGetMacro(XAxisMinorTickVisibility, bool);
397  vtkBooleanMacro(XAxisMinorTickVisibility, bool);
398 
399  vtkSetMacro(YAxisMinorTickVisibility, bool);
400  vtkGetMacro(YAxisMinorTickVisibility, bool);
401  vtkBooleanMacro(YAxisMinorTickVisibility, bool);
402 
403  vtkSetMacro(ZAxisMinorTickVisibility, bool);
404  vtkGetMacro(ZAxisMinorTickVisibility, bool);
405  vtkBooleanMacro(ZAxisMinorTickVisibility, bool);
407 
409 
413  vtkSetMacro(DrawXGridlines, bool);
414  vtkGetMacro(DrawXGridlines, bool);
415  vtkBooleanMacro(DrawXGridlines, bool);
416 
417  vtkSetMacro(DrawYGridlines, bool);
418  vtkGetMacro(DrawYGridlines, bool);
419  vtkBooleanMacro(DrawYGridlines, bool);
420 
421  vtkSetMacro(DrawZGridlines, bool);
422  vtkGetMacro(DrawZGridlines, bool);
423  vtkBooleanMacro(DrawZGridlines, bool);
425 
427 
431  vtkSetMacro(DrawXInnerGridlines, bool);
432  vtkGetMacro(DrawXInnerGridlines, bool);
433  vtkBooleanMacro(DrawXInnerGridlines, bool);
434 
435  vtkSetMacro(DrawYInnerGridlines, bool);
436  vtkGetMacro(DrawYInnerGridlines, bool);
437  vtkBooleanMacro(DrawYInnerGridlines, bool);
438 
439  vtkSetMacro(DrawZInnerGridlines, bool);
440  vtkGetMacro(DrawZInnerGridlines, bool);
441  vtkBooleanMacro(DrawZInnerGridlines, bool);
443 
445 
449  vtkSetMacro(DrawXGridpolys, bool);
450  vtkGetMacro(DrawXGridpolys, bool);
451  vtkBooleanMacro(DrawXGridpolys, bool);
452 
453  vtkSetMacro(DrawYGridpolys, bool);
454  vtkGetMacro(DrawYGridpolys, bool);
455  vtkBooleanMacro(DrawYGridpolys, bool);
456 
457  vtkSetMacro(DrawZGridpolys, bool);
458  vtkGetMacro(DrawZGridpolys, bool);
459  vtkBooleanMacro(DrawZGridpolys, bool);
461 
466 
471 
473 
483 
485 
495 
497 
507 
509 
519 
521  {
522  VTK_TICKS_INSIDE = 0,
523  VTK_TICKS_OUTSIDE = 1,
524  VTK_TICKS_BOTH = 2
525  };
526 
528 
532  vtkSetClampMacro(TickLocation, int, VTK_TICKS_INSIDE, VTK_TICKS_BOTH);
533  vtkGetMacro(TickLocation, int);
535 
536  void SetTickLocationToInside() { this->SetTickLocation(VTK_TICKS_INSIDE); }
537  void SetTickLocationToOutside() { this->SetTickLocation(VTK_TICKS_OUTSIDE); }
538  void SetTickLocationToBoth() { this->SetTickLocation(VTK_TICKS_BOTH); }
539 
540  void SetLabelScaling(bool, int, int, int);
541 
543 
548  void SetUseTextActor3D(bool enable);
551 
553 
557  void SetUse2DMode(bool enable);
558  bool GetUse2DMode();
560 
564  void SetSaveTitlePosition(int val);
565 
567 
571  vtkSetVector6Macro(OrientedBounds, double);
572  vtkGetVector6Macro(OrientedBounds, double);
574 
576 
580  vtkSetMacro(UseOrientedBounds, bool);
581  vtkGetMacro(UseOrientedBounds, bool);
583 
585 
589  vtkSetVector3Macro(AxisBaseForX, double);
590  vtkGetVector3Macro(AxisBaseForX, double);
592 
594 
598  vtkSetVector3Macro(AxisBaseForY, double);
599  vtkGetVector3Macro(AxisBaseForY, double);
601 
603 
607  vtkSetVector3Macro(AxisBaseForZ, double);
608  vtkGetVector3Macro(AxisBaseForZ, double);
610 
612 
617  vtkSetVector3Macro(AxisOrigin, double);
618  vtkGetVector3Macro(AxisOrigin, double);
620 
622 
626  vtkSetMacro(UseAxisOrigin, bool);
627  vtkGetMacro(UseAxisOrigin, bool);
629 
631 
635  vtkSetMacro(GridLineLocation, int);
636  vtkGetMacro(GridLineLocation, int);
638 
640 
646  vtkSetMacro(StickyAxes, bool);
647  vtkGetMacro(StickyAxes, bool);
648  vtkBooleanMacro(StickyAxes, bool);
650 
652 
660  vtkSetMacro(CenterStickyAxes, bool);
661  vtkGetMacro(CenterStickyAxes, bool);
662  vtkBooleanMacro(CenterStickyAxes, bool);
664 
666  {
667  VTK_GRID_LINES_ALL = 0,
668  VTK_GRID_LINES_CLOSEST = 1,
669  VTK_GRID_LINES_FURTHEST = 2
670  };
671 
672 protected:
674  ~vtkCubeAxesActor() override;
675 
682  vtkViewport* viewport, const double bounds[6], double sphereCenter[3], double& sphereRadius);
683 
687  void GetViewportLimitedBounds(vtkViewport* viewport, double bounds[6]);
688 
693  static void GetBoundsPointBits(
694  unsigned int pointIndex, unsigned int& xBit, unsigned int& yBit, unsigned int& zBit);
695 
699  static void GetBoundsPoint(unsigned int pointIndex, const double bounds[6], double point[3]);
700 
701  int LabelExponent(double min, double max);
702 
703  int Digits(double min, double max);
704 
705  double MaxOf(double, double);
706  double MaxOf(double, double, double, double);
707 
708  double FFix(double);
709  double FSign(double, double);
710  int FRound(double fnt);
711  int GetNumTicks(double range, double fxt);
712 
713  void UpdateLabels(vtkAxisActor** axis, int index);
714 
716 
717  int FlyMode = VTK_FLY_CLOSEST_TRIAD;
718 
719  // Expose internally closest axis index computation
720  int FindClosestAxisIndex(double pts[8][3]);
721 
722  // Expose internally furthest axis index computation
723  int FindFurtherstAxisIndex(double pts[8][3]);
724 
725  // Expose internally the boundary edge fly mode axis index computation
726  void FindBoundaryEdge(int& indexOfAxisX, int& indexOfAxisY, int& indexOfAxisZ, double pts[8][3]);
727 
733  void UpdateGridLineVisibility(int axisIndex);
734 
735  // VTK_ALL_GRID_LINES 0
736  // VTK_CLOSEST_GRID_LINES 1
737  // VTK_FURTHEST_GRID_LINES 2
738  int GridLineLocation = VTK_GRID_LINES_ALL;
739 
743  bool StickyAxes = false;
744 
748  bool CenterStickyAxes = true;
749 
754  bool EnableDistanceLOD = true;
755 
760  double DistanceLODThreshold = 0.8;
761 
766  bool EnableViewAngleLOD = true;
767 
772  double ViewAngleLODThreshold = 0.2;
773 
775  {
776  NUMBER_OF_ALIGNED_AXIS = 4
777  };
778 
780 
784  vtkAxisActor* XAxes[NUMBER_OF_ALIGNED_AXIS];
785  vtkAxisActor* YAxes[NUMBER_OF_ALIGNED_AXIS];
786  vtkAxisActor* ZAxes[NUMBER_OF_ALIGNED_AXIS];
788 
789  bool RebuildAxes = true;
790 
791  char* XTitle = nullptr;
792  char* XUnits = nullptr;
793  char* YTitle = nullptr;
794  char* YUnits = nullptr;
795  char* ZTitle = nullptr;
796  char* ZUnits = nullptr;
797 
798  char* ActualXLabel = nullptr;
799  char* ActualYLabel = nullptr;
800  char* ActualZLabel = nullptr;
801 
802  int TickLocation = VTK_TICKS_INSIDE;
803 
804  bool XAxisVisibility = true;
805  bool YAxisVisibility = true;
806  bool ZAxisVisibility = true;
807 
808  bool XAxisTickVisibility = true;
809  bool YAxisTickVisibility = true;
810  bool ZAxisTickVisibility = true;
811 
812  bool XAxisMinorTickVisibility = true;
813  bool YAxisMinorTickVisibility = true;
814  bool ZAxisMinorTickVisibility = true;
815 
816  bool XAxisLabelVisibility = true;
817  bool YAxisLabelVisibility = true;
818  bool ZAxisLabelVisibility = true;
819 
820  bool DrawXGridlines = false;
821  bool DrawYGridlines = false;
822  bool DrawZGridlines = false;
823 
824  bool DrawXInnerGridlines = false;
825  bool DrawYInnerGridlines = false;
826  bool DrawZInnerGridlines = false;
827 
828  bool DrawXGridpolys = false;
829  bool DrawYGridpolys = false;
830  bool DrawZGridpolys = false;
831 
832  char* XLabelFormat = nullptr;
833  char* YLabelFormat = nullptr;
834  char* ZLabelFormat = nullptr;
835 
836  double CornerOffset = 0.0;
837 
838  int Inertia = 1;
839 
840  int RenderCount = 0;
841 
842  int InertiaLocs[3] = { -1, -1, -1 };
843 
844  bool RenderSomething = false;
845 
846  vtkNew<vtkTextProperty> TitleTextProperty[3];
848  vtkNew<vtkTextProperty> LabelTextProperty[3];
849 
862 
863  double RenderedBounds[6] = { -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 };
864  double OrientedBounds[6] = { -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 };
865  bool UseOrientedBounds = false;
866 
867  double AxisOrigin[3] = { 0.0, 0.0, 0.0 };
868  bool UseAxisOrigin = false;
869 
870  double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
871  double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
872  double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
873 
874 private:
875  vtkCubeAxesActor(const vtkCubeAxesActor&) = delete;
876  void operator=(const vtkCubeAxesActor&) = delete;
877 
878  vtkSetStringMacro(ActualXLabel);
879  vtkSetStringMacro(ActualYLabel);
880  vtkSetStringMacro(ActualZLabel);
881 
882  vtkTimeStamp BuildTime;
883  bool LastUseOrientedBounds = false;
884  int LastXPow = 0;
885  int LastYPow = 0;
886  int LastZPow = 0;
887 
888  int UserXPow = 0;
889  int UserYPow = 0;
890  int UserZPow = 0;
891 
892  bool AutoLabelScaling = true;
893 
894  int LastXAxisDigits = 3;
895  int LastYAxisDigits = 3;
896  int LastZAxisDigits = 3;
897 
898  double LastXRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
899  double LastYRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
900  double LastZRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
901  double LastBounds[6] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX, VTK_DOUBLE_MAX, VTK_DOUBLE_MAX,
903 
904  int LastFlyMode = -1;
905 
906  int RenderAxesX[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
907  int RenderAxesY[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
908  int RenderAxesZ[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
909 
910  int NumberOfAxesX = 1;
911  int NumberOfAxesY = 1;
912  int NumberOfAxesZ = 1;
913 
914  bool MustAdjustXValue = false;
915  bool MustAdjustYValue = false;
916  bool MustAdjustZValue = false;
917 
918  bool ForceXLabelReset = false;
919  bool ForceYLabelReset = false;
920  bool ForceZLabelReset = false;
921 
922  double XAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
923  double YAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
924  double ZAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
925 
926  double LabelScale = -1.0;
927  double TitleScale = -1.0;
928 
929  double ScreenSize = 10.0;
930  double LabelOffset = 20.0;
931  double TitleOffset[2] = { 20.0, 20.0 };
932 
934 
938  double MajorStart[3] = { 0.0, 0.0, 0.0 };
939  double DeltaMajor[3] = { 0.0, 0.0, 0.0 };
941 
942  int RenderGeometry(bool& initialRender, vtkViewport* viewport, bool checkAxisVisibility,
943  int (vtkAxisActor::*renderMethod)(vtkViewport*));
944 
945  void TransformBounds(vtkViewport* viewport, const double bounds[6], double pts[8][3]);
946  void AdjustAxes(double bounds[6], double xCoords[NUMBER_OF_ALIGNED_AXIS][6],
947  double yCoords[NUMBER_OF_ALIGNED_AXIS][6], double zCoords[NUMBER_OF_ALIGNED_AXIS][6],
948  double xRange[2], double yRange[2], double zRange[2]);
949 
950  bool ComputeTickSize(double bounds[6]);
951  void AdjustValues(const double xRange[2], const double yRange[2], const double zRange[2]);
952  void AdjustRange(const double bounds[6]);
953  void BuildAxes(vtkViewport*);
954  void DetermineRenderAxes(vtkViewport*);
955  void SetNonDependentAttributes();
956  void BuildLabels(vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS]);
957  void AdjustTicksComputeRange(
958  vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS], double rangeMin, double rangeMax);
959 
960  void AutoScale(vtkViewport* viewport);
961  void AutoScale(vtkViewport* viewport, vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS]);
962  double AutoScale(vtkViewport* viewport, double screenSize, double position[3]);
963 };
964 
965 VTK_ABI_NAMESPACE_END
966 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:151
Create an axis with tick marks and labels.
Definition: vtkAxisActor.h:90
a virtual camera for 3D rendering
Definition: vtkCamera.h:151
create a plot of a bounding box edges - used for navigation
void FindBoundaryEdge(int &indexOfAxisX, int &indexOfAxisY, int &indexOfAxisZ, double pts[8][3])
vtkStringArray * GetAxisLabels(int axis)
Explicitly specify the axis labels along an axis as an array of strings instead of using the values.
virtual double * GetRenderedBounds()
Method used to properly return the bounds of the cube axis itself with all its labels.
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 * GetYAxesGridpolysProperty()
Get/Set axes gridPolys 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 * GetXAxesInnerGridlinesProperty()
Get/Set axes inner gridlines actors properties.
void SetXAxesGridpolysProperty(vtkProperty *)
Get/Set axes gridPolys actors properties.
vtkProperty * GetZAxesInnerGridlinesProperty()
Get/Set axes inner gridlines 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.
vtkProperty * GetZAxesLinesProperty()
Get/Set axes actors properties.
vtkProperty * GetYAxesLinesProperty()
Get/Set axes actors properties.
static vtkCubeAxesActor * New()
Instantiate object with label format "6.3g" and the number of labels per axis set to 3.
void SetUse2DMode(bool enable)
Get/Set 2D mode NB: Use vtkTextActor for titles in 2D instead of vtkAxisFollower.
vtkNew< vtkProperty > YAxesGridpolysProperty
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
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.
vtkProperty * GetYAxesGridlinesProperty()
Get/Set axes (outer) gridlines actors properties.
void SetUseTextActor3D(bool enable)
Use or not vtkTextActor3D for titles and labels.
void SetTickLocationToOutside()
double * GetBounds() override
Explicitly specify the region in space around which to draw the bounds.
void SetZAxesLinesProperty(vtkProperty *)
Get/Set axes actors properties.
vtkProperty * GetXAxesGridlinesProperty()
Get/Set axes (outer) gridlines 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.
vtkNew< vtkProperty > XAxesGridpolysProperty
vtkProperty * GetXAxesLinesProperty()
Get/Set axes actors properties.
vtkTextProperty * GetTitleTextProperty(int)
Returns the text property for the title on an axis.
vtkNew< vtkProperty > YAxesInnerGridlinesProperty
void SetSaveTitlePosition(int val)
For 2D mode only: save axis title positions for later use.
vtkNew< vtkProperty > ZAxesLinesProperty
vtkTextProperty * GetLabelTextProperty(int)
Returns the text property for the labels 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
vtkProperty * GetYAxesInnerGridlinesProperty()
Get/Set axes inner gridlines actors properties.
double FFix(double)
int FindFurtherstAxisIndex(double pts[8][3])
vtkNew< vtkProperty > XAxesInnerGridlinesProperty
vtkNew< vtkProperty > ZAxesGridpolysProperty
vtkProperty * GetXAxesGridpolysProperty()
Get/Set axes gridPolys actors properties.
double MaxOf(double, double, double, double)
vtkProperty * GetZAxesGridpolysProperty()
Get/Set axes gridPolys actors properties.
int GetNumTicks(double range, double fxt)
void UpdateLabels(vtkAxisActor **axis, int index)
int Digits(double min, double max)
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the axes as per the vtkProp superclass' API.
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()
int LabelExponent(double min, double max)
vtkProperty * GetZAxesGridlinesProperty()
Get/Set axes (outer) gridlines actors properties.
void SetXAxesLinesProperty(vtkProperty *)
Get/Set axes actors properties.
void SetYAxesGridlinesProperty(vtkProperty *)
Get/Set axes (outer) gridlines 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:108
double Bounds[6]
Definition: vtkProp3D.h:449
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
represent surface properties of a geometric object
Definition: vtkProperty.h:167
a vtkAbstractArray subclass for strings
represent text properties.
record modification and/or execution time
Definition: vtkTimeStamp.h:44
abstract specification for Viewports
Definition: vtkViewport.h:65
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48
@ point
Definition: vtkX3D.h:236
@ vector
Definition: vtkX3D.h:237
@ value
Definition: vtkX3D.h:220
@ range
Definition: vtkX3D.h:238
@ position
Definition: vtkX3D.h:261
@ index
Definition: vtkX3D.h:246
@ offset
Definition: vtkX3D.h:438
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 VTK_MARSHALAUTO
#define max(a, b)