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
56 #ifndef vtkCubeAxesActor_h
57 #define vtkCubeAxesActor_h
58 
59 #include "vtkActor.h"
60 #include "vtkDeprecation.h" // For deprecation macro
61 #include "vtkNew.h" // For vtkNew
62 #include "vtkRenderingAnnotationModule.h" // For export macro
63 #include "vtkSmartPointer.h" // For vtkSmartPointer
64 
65 VTK_ABI_NAMESPACE_BEGIN
66 class vtkAxisActor;
67 class vtkCamera;
68 class vtkTextProperty;
69 class vtkStringArray;
70 
71 class VTKRENDERINGANNOTATION_EXPORT vtkCubeAxesActor : public vtkActor
72 {
73 public:
74  vtkTypeMacro(vtkCubeAxesActor, vtkActor);
75  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
81  static vtkCubeAxesActor* New();
82 
84 
90  int RenderOverlay(vtkViewport*) override;
93 
95 
99  vtkSetMacro(RebuildAxes, bool);
100  vtkGetMacro(RebuildAxes, bool);
102 
104 
110  vtkSetVector6Macro(Bounds, double);
111  using Superclass::GetBounds;
112  double* GetBounds() VTK_SIZEHINT(6) override { return this->Bounds; }
114 
116 
120  virtual void GetRenderedBounds(double rBounds[6]);
121  virtual double* GetRenderedBounds();
123 
125 
133  vtkSetVector2Macro(XAxisRange, double);
134  vtkSetVector2Macro(YAxisRange, double);
135  vtkSetVector2Macro(ZAxisRange, double);
136  vtkGetVector2Macro(XAxisRange, double);
137  vtkGetVector2Macro(YAxisRange, double);
140 
147 
148  vtkGetVector2Macro(ZAxisRange, double);
149 
151 
157  void SetScreenSize(double screenSize);
158  vtkGetMacro(ScreenSize, double);
160 
162 
166  void SetLabelOffset(double offset);
167  vtkGetMacro(LabelOffset, double);
169 
171 
175  VTK_DEPRECATED_IN_9_3_0("Use the new setters as it's now a 2d vector")
176  void SetTitleOffset(double titleOffsetY);
177  VTK_DEPRECATED_IN_9_3_0("Use the new getter as it's now a 2d vector")
178  double GetTitleOffset();
179  void SetTitleOffset(double titleOffset[2]);
180  // TODO: Replace getter with macro once deprecated one is removed
181  void GetTitleOffset(double& titleOffsetX, double& titleOffsetY);
183 
185 
189  virtual void SetCamera(vtkCamera*);
190  vtkCamera* GetCamera();
192 
193  enum FlyMode
194  {
195  VTK_FLY_OUTER_EDGES = 0,
196  VTK_FLY_CLOSEST_TRIAD = 1,
197  VTK_FLY_FURTHEST_TRIAD = 2,
198  VTK_FLY_STATIC_TRIAD = 3,
199  VTK_FLY_STATIC_EDGES = 4
200  };
201 
203 
209  vtkSetClampMacro(FlyMode, int, VTK_FLY_OUTER_EDGES, VTK_FLY_STATIC_EDGES);
210  vtkGetMacro(FlyMode, int);
211  void SetFlyModeToOuterEdges() { this->SetFlyMode(VTK_FLY_OUTER_EDGES); }
212  void SetFlyModeToClosestTriad() { this->SetFlyMode(VTK_FLY_CLOSEST_TRIAD); }
213  void SetFlyModeToFurthestTriad() { this->SetFlyMode(VTK_FLY_FURTHEST_TRIAD); }
214  void SetFlyModeToStaticTriad() { this->SetFlyMode(VTK_FLY_STATIC_TRIAD); }
215  void SetFlyModeToStaticEdges() { this->SetFlyMode(VTK_FLY_STATIC_EDGES); }
217 
219 
223  vtkSetStringMacro(XTitle);
224  vtkGetStringMacro(XTitle);
225  vtkSetStringMacro(XUnits);
226  vtkGetStringMacro(XUnits);
227  vtkSetStringMacro(YTitle);
228  vtkGetStringMacro(YTitle);
229  vtkSetStringMacro(YUnits);
230  vtkGetStringMacro(YUnits);
231  vtkSetStringMacro(ZTitle);
232  vtkGetStringMacro(ZTitle);
233  vtkSetStringMacro(ZUnits);
234  vtkGetStringMacro(ZUnits);
236 
238 
242  vtkSetStringMacro(XLabelFormat);
243  vtkGetStringMacro(XLabelFormat);
244  vtkSetStringMacro(YLabelFormat);
245  vtkGetStringMacro(YLabelFormat);
246  vtkSetStringMacro(ZLabelFormat);
247  vtkGetStringMacro(ZLabelFormat);
249 
251 
257  vtkSetClampMacro(Inertia, int, 1, VTK_INT_MAX);
258  vtkGetMacro(Inertia, int);
260 
262 
268  vtkSetMacro(CornerOffset, double);
269  vtkGetMacro(CornerOffset, double);
271 
278 
280 
284  vtkSetMacro(EnableDistanceLOD, bool);
285  vtkGetMacro(EnableDistanceLOD, bool);
287 
289 
293  vtkSetClampMacro(DistanceLODThreshold, double, 0.0, 1.0);
294  vtkGetMacro(DistanceLODThreshold, double);
296 
298 
302  vtkSetMacro(EnableViewAngleLOD, bool);
303  vtkGetMacro(EnableViewAngleLOD, bool);
305 
307 
311  vtkSetClampMacro(ViewAngleLODThreshold, double, 0., 1.);
312  vtkGetMacro(ViewAngleLODThreshold, double);
314 
316 
320  vtkSetMacro(XAxisVisibility, bool);
321  vtkGetMacro(XAxisVisibility, bool);
322  vtkBooleanMacro(XAxisVisibility, bool);
323 
324  vtkSetMacro(YAxisVisibility, bool);
325  vtkGetMacro(YAxisVisibility, bool);
326  vtkBooleanMacro(YAxisVisibility, bool);
327 
328  vtkSetMacro(ZAxisVisibility, bool);
329  vtkGetMacro(ZAxisVisibility, bool);
330  vtkBooleanMacro(ZAxisVisibility, bool);
332 
334 
338  vtkSetMacro(XAxisLabelVisibility, bool);
339  vtkGetMacro(XAxisLabelVisibility, bool);
340  vtkBooleanMacro(XAxisLabelVisibility, bool);
341 
342  vtkSetMacro(YAxisLabelVisibility, bool);
343  vtkGetMacro(YAxisLabelVisibility, bool);
344  vtkBooleanMacro(YAxisLabelVisibility, bool);
345 
346  vtkSetMacro(ZAxisLabelVisibility, bool);
347  vtkGetMacro(ZAxisLabelVisibility, bool);
348  vtkBooleanMacro(ZAxisLabelVisibility, bool);
350 
352 
356  vtkSetMacro(XAxisTickVisibility, bool);
357  vtkGetMacro(XAxisTickVisibility, bool);
358  vtkBooleanMacro(XAxisTickVisibility, bool);
359 
360  vtkSetMacro(YAxisTickVisibility, bool);
361  vtkGetMacro(YAxisTickVisibility, bool);
362  vtkBooleanMacro(YAxisTickVisibility, bool);
363 
364  vtkSetMacro(ZAxisTickVisibility, bool);
365  vtkGetMacro(ZAxisTickVisibility, bool);
366  vtkBooleanMacro(ZAxisTickVisibility, bool);
368 
370 
374  vtkSetMacro(XAxisMinorTickVisibility, bool);
375  vtkGetMacro(XAxisMinorTickVisibility, bool);
376  vtkBooleanMacro(XAxisMinorTickVisibility, bool);
377 
378  vtkSetMacro(YAxisMinorTickVisibility, bool);
379  vtkGetMacro(YAxisMinorTickVisibility, bool);
380  vtkBooleanMacro(YAxisMinorTickVisibility, bool);
381 
382  vtkSetMacro(ZAxisMinorTickVisibility, bool);
383  vtkGetMacro(ZAxisMinorTickVisibility, bool);
384  vtkBooleanMacro(ZAxisMinorTickVisibility, bool);
386 
388 
392  vtkSetMacro(DrawXGridlines, bool);
393  vtkGetMacro(DrawXGridlines, bool);
394  vtkBooleanMacro(DrawXGridlines, bool);
395 
396  vtkSetMacro(DrawYGridlines, bool);
397  vtkGetMacro(DrawYGridlines, bool);
398  vtkBooleanMacro(DrawYGridlines, bool);
399 
400  vtkSetMacro(DrawZGridlines, bool);
401  vtkGetMacro(DrawZGridlines, bool);
402  vtkBooleanMacro(DrawZGridlines, bool);
404 
406 
410  vtkSetMacro(DrawXInnerGridlines, bool);
411  vtkGetMacro(DrawXInnerGridlines, bool);
412  vtkBooleanMacro(DrawXInnerGridlines, bool);
413 
414  vtkSetMacro(DrawYInnerGridlines, bool);
415  vtkGetMacro(DrawYInnerGridlines, bool);
416  vtkBooleanMacro(DrawYInnerGridlines, bool);
417 
418  vtkSetMacro(DrawZInnerGridlines, bool);
419  vtkGetMacro(DrawZInnerGridlines, bool);
420  vtkBooleanMacro(DrawZInnerGridlines, bool);
422 
424 
428  vtkSetMacro(DrawXGridpolys, bool);
429  vtkGetMacro(DrawXGridpolys, bool);
430  vtkBooleanMacro(DrawXGridpolys, bool);
431 
432  vtkSetMacro(DrawYGridpolys, bool);
433  vtkGetMacro(DrawYGridpolys, bool);
434  vtkBooleanMacro(DrawYGridpolys, bool);
435 
436  vtkSetMacro(DrawZGridpolys, bool);
437  vtkGetMacro(DrawZGridpolys, bool);
438  vtkBooleanMacro(DrawZGridpolys, bool);
440 
445 
450 
452 
462 
464 
474 
476 
486 
488 
498 
500  {
501  VTK_TICKS_INSIDE = 0,
502  VTK_TICKS_OUTSIDE = 1,
503  VTK_TICKS_BOTH = 2
504  };
505 
507 
511  vtkSetClampMacro(TickLocation, int, VTK_TICKS_INSIDE, VTK_TICKS_BOTH);
512  vtkGetMacro(TickLocation, int);
514 
515  void SetTickLocationToInside() { this->SetTickLocation(VTK_TICKS_INSIDE); }
516  void SetTickLocationToOutside() { this->SetTickLocation(VTK_TICKS_OUTSIDE); }
517  void SetTickLocationToBoth() { this->SetTickLocation(VTK_TICKS_BOTH); }
518 
519  void SetLabelScaling(bool, int, int, int);
520 
522 
527  void SetUseTextActor3D(bool enable);
530 
532 
536  void SetUse2DMode(bool enable);
537  bool GetUse2DMode();
539 
543  void SetSaveTitlePosition(int val);
544 
546 
550  vtkSetVector6Macro(OrientedBounds, double);
551  vtkGetVector6Macro(OrientedBounds, double);
553 
555 
559  vtkSetMacro(UseOrientedBounds, bool);
560  vtkGetMacro(UseOrientedBounds, bool);
562 
564 
568  vtkSetVector3Macro(AxisBaseForX, double);
569  vtkGetVector3Macro(AxisBaseForX, double);
571 
573 
577  vtkSetVector3Macro(AxisBaseForY, double);
578  vtkGetVector3Macro(AxisBaseForY, double);
580 
582 
586  vtkSetVector3Macro(AxisBaseForZ, double);
587  vtkGetVector3Macro(AxisBaseForZ, double);
589 
591 
596  vtkSetVector3Macro(AxisOrigin, double);
597  vtkGetVector3Macro(AxisOrigin, double);
599 
601 
605  vtkSetMacro(UseAxisOrigin, bool);
606  vtkGetMacro(UseAxisOrigin, bool);
608 
610 
614  vtkSetMacro(GridLineLocation, int);
615  vtkGetMacro(GridLineLocation, int);
617 
619 
625  vtkSetMacro(StickyAxes, bool);
626  vtkGetMacro(StickyAxes, bool);
627  vtkBooleanMacro(StickyAxes, bool);
629 
631 
639  vtkSetMacro(CenterStickyAxes, bool);
640  vtkGetMacro(CenterStickyAxes, bool);
641  vtkBooleanMacro(CenterStickyAxes, bool);
643 
645  {
646  VTK_GRID_LINES_ALL = 0,
647  VTK_GRID_LINES_CLOSEST = 1,
648  VTK_GRID_LINES_FURTHEST = 2
649  };
650 
651 protected:
653  ~vtkCubeAxesActor() override;
654 
661  vtkViewport* viewport, const double bounds[6], double sphereCenter[3], double& sphereRadius);
662 
666  void GetViewportLimitedBounds(vtkViewport* viewport, double bounds[6]);
667 
672  static void GetBoundsPointBits(
673  unsigned int pointIndex, unsigned int& xBit, unsigned int& yBit, unsigned int& zBit);
674 
678  static void GetBoundsPoint(unsigned int pointIndex, const double bounds[6], double point[3]);
679 
680  int LabelExponent(double min, double max);
681 
682  int Digits(double min, double max);
683 
684  double MaxOf(double, double);
685  double MaxOf(double, double, double, double);
686 
687  double FFix(double);
688  double FSign(double, double);
689  int FRound(double fnt);
690  int GetNumTicks(double range, double fxt);
691 
692  void UpdateLabels(vtkAxisActor** axis, int index);
693 
695 
696  int FlyMode = VTK_FLY_CLOSEST_TRIAD;
697 
698  // Expose internally closest axis index computation
699  int FindClosestAxisIndex(double pts[8][3]);
700 
701  // Expose internally furthest axis index computation
702  int FindFurtherstAxisIndex(double pts[8][3]);
703 
704  // Expose internally the boundary edge fly mode axis index computation
705  void FindBoundaryEdge(int& indexOfAxisX, int& indexOfAxisY, int& indexOfAxisZ, double pts[8][3]);
706 
712  void UpdateGridLineVisibility(int axisIndex);
713 
714  // VTK_ALL_GRID_LINES 0
715  // VTK_CLOSEST_GRID_LINES 1
716  // VTK_FURTHEST_GRID_LINES 2
717  int GridLineLocation = VTK_GRID_LINES_ALL;
718 
722  bool StickyAxes = false;
723 
727  bool CenterStickyAxes = true;
728 
733  bool EnableDistanceLOD = true;
734 
739  double DistanceLODThreshold = 0.8;
740 
745  bool EnableViewAngleLOD = true;
746 
751  double ViewAngleLODThreshold = 0.2;
752 
754  {
755  NUMBER_OF_ALIGNED_AXIS = 4
756  };
757 
759 
763  vtkAxisActor* XAxes[NUMBER_OF_ALIGNED_AXIS];
764  vtkAxisActor* YAxes[NUMBER_OF_ALIGNED_AXIS];
765  vtkAxisActor* ZAxes[NUMBER_OF_ALIGNED_AXIS];
767 
768  bool RebuildAxes = true;
769 
770  char* XTitle = nullptr;
771  char* XUnits = nullptr;
772  char* YTitle = nullptr;
773  char* YUnits = nullptr;
774  char* ZTitle = nullptr;
775  char* ZUnits = nullptr;
776 
777  char* ActualXLabel = nullptr;
778  char* ActualYLabel = nullptr;
779  char* ActualZLabel = nullptr;
780 
781  int TickLocation = VTK_TICKS_INSIDE;
782 
783  bool XAxisVisibility = true;
784  bool YAxisVisibility = true;
785  bool ZAxisVisibility = true;
786 
787  bool XAxisTickVisibility = true;
788  bool YAxisTickVisibility = true;
789  bool ZAxisTickVisibility = true;
790 
791  bool XAxisMinorTickVisibility = true;
792  bool YAxisMinorTickVisibility = true;
793  bool ZAxisMinorTickVisibility = true;
794 
795  bool XAxisLabelVisibility = true;
796  bool YAxisLabelVisibility = true;
797  bool ZAxisLabelVisibility = true;
798 
799  bool DrawXGridlines = false;
800  bool DrawYGridlines = false;
801  bool DrawZGridlines = false;
802 
803  bool DrawXInnerGridlines = false;
804  bool DrawYInnerGridlines = false;
805  bool DrawZInnerGridlines = false;
806 
807  bool DrawXGridpolys = false;
808  bool DrawYGridpolys = false;
809  bool DrawZGridpolys = false;
810 
811  char* XLabelFormat = nullptr;
812  char* YLabelFormat = nullptr;
813  char* ZLabelFormat = nullptr;
814 
815  double CornerOffset = 0.0;
816 
817  int Inertia = 1;
818 
819  int RenderCount = 0;
820 
821  int InertiaLocs[3] = { -1, -1, -1 };
822 
823  bool RenderSomething = false;
824 
825  vtkNew<vtkTextProperty> TitleTextProperty[3];
827  vtkNew<vtkTextProperty> LabelTextProperty[3];
828 
841 
842  double RenderedBounds[6] = { -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 };
843  double OrientedBounds[6] = { -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 };
844  bool UseOrientedBounds = false;
845 
846  double AxisOrigin[3] = { 0.0, 0.0, 0.0 };
847  bool UseAxisOrigin = false;
848 
849  double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
850  double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
851  double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
852 
853 private:
854  vtkCubeAxesActor(const vtkCubeAxesActor&) = delete;
855  void operator=(const vtkCubeAxesActor&) = delete;
856 
857  vtkSetStringMacro(ActualXLabel);
858  vtkSetStringMacro(ActualYLabel);
859  vtkSetStringMacro(ActualZLabel);
860 
861  vtkTimeStamp BuildTime;
862  bool LastUseOrientedBounds = false;
863  int LastXPow = 0;
864  int LastYPow = 0;
865  int LastZPow = 0;
866 
867  int UserXPow = 0;
868  int UserYPow = 0;
869  int UserZPow = 0;
870 
871  bool AutoLabelScaling = true;
872 
873  int LastXAxisDigits = 3;
874  int LastYAxisDigits = 3;
875  int LastZAxisDigits = 3;
876 
877  double LastXRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
878  double LastYRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
879  double LastZRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
880  double LastBounds[6] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX, VTK_DOUBLE_MAX, VTK_DOUBLE_MAX,
882 
883  int LastFlyMode = -1;
884 
885  int RenderAxesX[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
886  int RenderAxesY[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
887  int RenderAxesZ[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
888 
889  int NumberOfAxesX = 1;
890  int NumberOfAxesY = 1;
891  int NumberOfAxesZ = 1;
892 
893  bool MustAdjustXValue = false;
894  bool MustAdjustYValue = false;
895  bool MustAdjustZValue = false;
896 
897  bool ForceXLabelReset = false;
898  bool ForceYLabelReset = false;
899  bool ForceZLabelReset = false;
900 
901  double XAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
902  double YAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
903  double ZAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
904 
905  double LabelScale = -1.0;
906  double TitleScale = -1.0;
907 
908  double ScreenSize = 10.0;
909  double LabelOffset = 20.0;
910  double TitleOffset[2] = { 20.0, 20.0 };
911 
913 
917  double MajorStart[3] = { 0.0, 0.0, 0.0 };
918  double DeltaMajor[3] = { 0.0, 0.0, 0.0 };
920 
921  int RenderGeometry(bool& initialRender, vtkViewport* viewport, bool checkAxisVisibility,
922  int (vtkAxisActor::*renderMethod)(vtkViewport*));
923 
924  void TransformBounds(vtkViewport* viewport, const double bounds[6], double pts[8][3]);
925  void AdjustAxes(double bounds[6], double xCoords[NUMBER_OF_ALIGNED_AXIS][6],
926  double yCoords[NUMBER_OF_ALIGNED_AXIS][6], double zCoords[NUMBER_OF_ALIGNED_AXIS][6],
927  double xRange[2], double yRange[2], double zRange[2]);
928 
929  bool ComputeTickSize(double bounds[6]);
930  void AdjustValues(const double xRange[2], const double yRange[2], const double zRange[2]);
931  void AdjustRange(const double bounds[6]);
932  void BuildAxes(vtkViewport*);
933  void DetermineRenderAxes(vtkViewport*);
934  void SetNonDependentAttributes();
935  void BuildLabels(vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS]);
936  void AdjustTicksComputeRange(
937  vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS], double rangeMin, double rangeMax);
938 
939  void AutoScale(vtkViewport* viewport);
940  void AutoScale(vtkViewport* viewport, vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS]);
941  double AutoScale(vtkViewport* viewport, double screenSize, double position[3]);
942 };
943 
944 VTK_ABI_NAMESPACE_END
945 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
Create an axis with tick marks and labels.
Definition: vtkAxisActor.h:79
a virtual camera for 3D rendering
Definition: vtkCamera.h:50
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:38
double Bounds[6]
Definition: vtkProp3D.h:406
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
represent surface properties of a geometric object
Definition: vtkProperty.h:66
a vtkAbstractArray subclass for strings
represent text properties.
record modification and/or execution time
Definition: vtkTimeStamp.h:34
abstract specification for Viewports
Definition: vtkViewport.h:54
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
@ 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 max(a, b)