VTK  9.3.20240327
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 
85 VTK_ABI_NAMESPACE_BEGIN
86 class vtkAxisActor;
87 class vtkCamera;
88 class vtkTextProperty;
89 class vtkStringArray;
90 
91 class VTKRENDERINGANNOTATION_EXPORT vtkCubeAxesActor : public vtkActor
92 {
93 public:
94  vtkTypeMacro(vtkCubeAxesActor, vtkActor);
95  void PrintSelf(ostream& os, vtkIndent indent) override;
96 
102 
104 
110  int RenderOverlay(vtkViewport*) override;
113 
115 
119  vtkSetMacro(RebuildAxes, bool);
120  vtkGetMacro(RebuildAxes, bool);
122 
124 
130  vtkSetVector6Macro(Bounds, double);
131  using Superclass::GetBounds;
132  double* GetBounds() VTK_SIZEHINT(6) override { return this->Bounds; }
134 
136 
140  virtual void GetRenderedBounds(double rBounds[6]);
141  virtual double* GetRenderedBounds();
143 
145 
153  vtkSetVector2Macro(XAxisRange, double);
154  vtkSetVector2Macro(YAxisRange, double);
155  vtkSetVector2Macro(ZAxisRange, double);
156  vtkGetVector2Macro(XAxisRange, double);
157  vtkGetVector2Macro(YAxisRange, double);
160 
167 
168  vtkGetVector2Macro(ZAxisRange, double);
169 
171 
177  void SetScreenSize(double screenSize);
178  vtkGetMacro(ScreenSize, double);
180 
182 
186  void SetLabelOffset(double offset);
187  vtkGetMacro(LabelOffset, double);
189 
191 
195  VTK_DEPRECATED_IN_9_3_0("Use the new setters as it's now a 2d vector")
196  void SetTitleOffset(double titleOffsetY);
197  VTK_DEPRECATED_IN_9_3_0("Use the new getter as it's now a 2d vector")
198  double GetTitleOffset();
199  void SetTitleOffset(double titleOffset[2]);
200  // TODO: Replace getter with macro once deprecated one is removed
201  void GetTitleOffset(double& titleOffsetX, double& titleOffsetY);
203 
205 
209  virtual void SetCamera(vtkCamera*);
210  vtkCamera* GetCamera();
212 
213  enum FlyMode
214  {
215  VTK_FLY_OUTER_EDGES = 0,
216  VTK_FLY_CLOSEST_TRIAD = 1,
217  VTK_FLY_FURTHEST_TRIAD = 2,
218  VTK_FLY_STATIC_TRIAD = 3,
219  VTK_FLY_STATIC_EDGES = 4
220  };
221 
223 
229  vtkSetClampMacro(FlyMode, int, VTK_FLY_OUTER_EDGES, VTK_FLY_STATIC_EDGES);
230  vtkGetMacro(FlyMode, int);
231  void SetFlyModeToOuterEdges() { this->SetFlyMode(VTK_FLY_OUTER_EDGES); }
232  void SetFlyModeToClosestTriad() { this->SetFlyMode(VTK_FLY_CLOSEST_TRIAD); }
233  void SetFlyModeToFurthestTriad() { this->SetFlyMode(VTK_FLY_FURTHEST_TRIAD); }
234  void SetFlyModeToStaticTriad() { this->SetFlyMode(VTK_FLY_STATIC_TRIAD); }
235  void SetFlyModeToStaticEdges() { this->SetFlyMode(VTK_FLY_STATIC_EDGES); }
237 
239 
243  vtkSetStringMacro(XTitle);
244  vtkGetStringMacro(XTitle);
245  vtkSetStringMacro(XUnits);
246  vtkGetStringMacro(XUnits);
247  vtkSetStringMacro(YTitle);
248  vtkGetStringMacro(YTitle);
249  vtkSetStringMacro(YUnits);
250  vtkGetStringMacro(YUnits);
251  vtkSetStringMacro(ZTitle);
252  vtkGetStringMacro(ZTitle);
253  vtkSetStringMacro(ZUnits);
254  vtkGetStringMacro(ZUnits);
256 
258 
262  vtkSetStringMacro(XLabelFormat);
263  vtkGetStringMacro(XLabelFormat);
264  vtkSetStringMacro(YLabelFormat);
265  vtkGetStringMacro(YLabelFormat);
266  vtkSetStringMacro(ZLabelFormat);
267  vtkGetStringMacro(ZLabelFormat);
269 
271 
277  vtkSetClampMacro(Inertia, int, 1, VTK_INT_MAX);
278  vtkGetMacro(Inertia, int);
280 
282 
288  vtkSetMacro(CornerOffset, double);
289  vtkGetMacro(CornerOffset, double);
291 
298 
300 
304  vtkSetMacro(EnableDistanceLOD, bool);
305  vtkGetMacro(EnableDistanceLOD, bool);
307 
309 
313  vtkSetClampMacro(DistanceLODThreshold, double, 0.0, 1.0);
314  vtkGetMacro(DistanceLODThreshold, double);
316 
318 
322  vtkSetMacro(EnableViewAngleLOD, bool);
323  vtkGetMacro(EnableViewAngleLOD, bool);
325 
327 
331  vtkSetClampMacro(ViewAngleLODThreshold, double, 0., 1.);
332  vtkGetMacro(ViewAngleLODThreshold, double);
334 
336 
340  vtkSetMacro(XAxisVisibility, bool);
341  vtkGetMacro(XAxisVisibility, bool);
342  vtkBooleanMacro(XAxisVisibility, bool);
343 
344  vtkSetMacro(YAxisVisibility, bool);
345  vtkGetMacro(YAxisVisibility, bool);
346  vtkBooleanMacro(YAxisVisibility, bool);
347 
348  vtkSetMacro(ZAxisVisibility, bool);
349  vtkGetMacro(ZAxisVisibility, bool);
350  vtkBooleanMacro(ZAxisVisibility, bool);
352 
354 
358  vtkSetMacro(XAxisLabelVisibility, bool);
359  vtkGetMacro(XAxisLabelVisibility, bool);
360  vtkBooleanMacro(XAxisLabelVisibility, bool);
361 
362  vtkSetMacro(YAxisLabelVisibility, bool);
363  vtkGetMacro(YAxisLabelVisibility, bool);
364  vtkBooleanMacro(YAxisLabelVisibility, bool);
365 
366  vtkSetMacro(ZAxisLabelVisibility, bool);
367  vtkGetMacro(ZAxisLabelVisibility, bool);
368  vtkBooleanMacro(ZAxisLabelVisibility, bool);
370 
372 
376  vtkSetMacro(XAxisTickVisibility, bool);
377  vtkGetMacro(XAxisTickVisibility, bool);
378  vtkBooleanMacro(XAxisTickVisibility, bool);
379 
380  vtkSetMacro(YAxisTickVisibility, bool);
381  vtkGetMacro(YAxisTickVisibility, bool);
382  vtkBooleanMacro(YAxisTickVisibility, bool);
383 
384  vtkSetMacro(ZAxisTickVisibility, bool);
385  vtkGetMacro(ZAxisTickVisibility, bool);
386  vtkBooleanMacro(ZAxisTickVisibility, bool);
388 
390 
394  vtkSetMacro(XAxisMinorTickVisibility, bool);
395  vtkGetMacro(XAxisMinorTickVisibility, bool);
396  vtkBooleanMacro(XAxisMinorTickVisibility, bool);
397 
398  vtkSetMacro(YAxisMinorTickVisibility, bool);
399  vtkGetMacro(YAxisMinorTickVisibility, bool);
400  vtkBooleanMacro(YAxisMinorTickVisibility, bool);
401 
402  vtkSetMacro(ZAxisMinorTickVisibility, bool);
403  vtkGetMacro(ZAxisMinorTickVisibility, bool);
404  vtkBooleanMacro(ZAxisMinorTickVisibility, bool);
406 
408 
412  vtkSetMacro(DrawXGridlines, bool);
413  vtkGetMacro(DrawXGridlines, bool);
414  vtkBooleanMacro(DrawXGridlines, bool);
415 
416  vtkSetMacro(DrawYGridlines, bool);
417  vtkGetMacro(DrawYGridlines, bool);
418  vtkBooleanMacro(DrawYGridlines, bool);
419 
420  vtkSetMacro(DrawZGridlines, bool);
421  vtkGetMacro(DrawZGridlines, bool);
422  vtkBooleanMacro(DrawZGridlines, bool);
424 
426 
430  vtkSetMacro(DrawXInnerGridlines, bool);
431  vtkGetMacro(DrawXInnerGridlines, bool);
432  vtkBooleanMacro(DrawXInnerGridlines, bool);
433 
434  vtkSetMacro(DrawYInnerGridlines, bool);
435  vtkGetMacro(DrawYInnerGridlines, bool);
436  vtkBooleanMacro(DrawYInnerGridlines, bool);
437 
438  vtkSetMacro(DrawZInnerGridlines, bool);
439  vtkGetMacro(DrawZInnerGridlines, bool);
440  vtkBooleanMacro(DrawZInnerGridlines, bool);
442 
444 
448  vtkSetMacro(DrawXGridpolys, bool);
449  vtkGetMacro(DrawXGridpolys, bool);
450  vtkBooleanMacro(DrawXGridpolys, bool);
451 
452  vtkSetMacro(DrawYGridpolys, bool);
453  vtkGetMacro(DrawYGridpolys, bool);
454  vtkBooleanMacro(DrawYGridpolys, bool);
455 
456  vtkSetMacro(DrawZGridpolys, bool);
457  vtkGetMacro(DrawZGridpolys, bool);
458  vtkBooleanMacro(DrawZGridpolys, bool);
460 
465 
470 
472 
482 
484 
494 
496 
506 
508 
518 
520  {
521  VTK_TICKS_INSIDE = 0,
522  VTK_TICKS_OUTSIDE = 1,
523  VTK_TICKS_BOTH = 2
524  };
525 
527 
531  vtkSetClampMacro(TickLocation, int, VTK_TICKS_INSIDE, VTK_TICKS_BOTH);
532  vtkGetMacro(TickLocation, int);
534 
535  void SetTickLocationToInside() { this->SetTickLocation(VTK_TICKS_INSIDE); }
536  void SetTickLocationToOutside() { this->SetTickLocation(VTK_TICKS_OUTSIDE); }
537  void SetTickLocationToBoth() { this->SetTickLocation(VTK_TICKS_BOTH); }
538 
539  void SetLabelScaling(bool, int, int, int);
540 
542 
547  void SetUseTextActor3D(bool enable);
550 
552 
556  void SetUse2DMode(bool enable);
557  bool GetUse2DMode();
559 
563  void SetSaveTitlePosition(int val);
564 
566 
570  vtkSetVector6Macro(OrientedBounds, double);
571  vtkGetVector6Macro(OrientedBounds, double);
573 
575 
579  vtkSetMacro(UseOrientedBounds, bool);
580  vtkGetMacro(UseOrientedBounds, bool);
582 
584 
588  vtkSetVector3Macro(AxisBaseForX, double);
589  vtkGetVector3Macro(AxisBaseForX, double);
591 
593 
597  vtkSetVector3Macro(AxisBaseForY, double);
598  vtkGetVector3Macro(AxisBaseForY, double);
600 
602 
606  vtkSetVector3Macro(AxisBaseForZ, double);
607  vtkGetVector3Macro(AxisBaseForZ, double);
609 
611 
616  vtkSetVector3Macro(AxisOrigin, double);
617  vtkGetVector3Macro(AxisOrigin, double);
619 
621 
625  vtkSetMacro(UseAxisOrigin, bool);
626  vtkGetMacro(UseAxisOrigin, bool);
628 
630 
634  vtkSetMacro(GridLineLocation, int);
635  vtkGetMacro(GridLineLocation, int);
637 
639 
645  vtkSetMacro(StickyAxes, bool);
646  vtkGetMacro(StickyAxes, bool);
647  vtkBooleanMacro(StickyAxes, bool);
649 
651 
659  vtkSetMacro(CenterStickyAxes, bool);
660  vtkGetMacro(CenterStickyAxes, bool);
661  vtkBooleanMacro(CenterStickyAxes, bool);
663 
665  {
666  VTK_GRID_LINES_ALL = 0,
667  VTK_GRID_LINES_CLOSEST = 1,
668  VTK_GRID_LINES_FURTHEST = 2
669  };
670 
671 protected:
673  ~vtkCubeAxesActor() override;
674 
681  vtkViewport* viewport, const double bounds[6], double sphereCenter[3], double& sphereRadius);
682 
686  void GetViewportLimitedBounds(vtkViewport* viewport, double bounds[6]);
687 
692  static void GetBoundsPointBits(
693  unsigned int pointIndex, unsigned int& xBit, unsigned int& yBit, unsigned int& zBit);
694 
698  static void GetBoundsPoint(unsigned int pointIndex, const double bounds[6], double point[3]);
699 
700  int LabelExponent(double min, double max);
701 
702  int Digits(double min, double max);
703 
704  double MaxOf(double, double);
705  double MaxOf(double, double, double, double);
706 
707  double FFix(double);
708  double FSign(double, double);
709  int FRound(double fnt);
710  int GetNumTicks(double range, double fxt);
711 
712  void UpdateLabels(vtkAxisActor** axis, int index);
713 
715 
716  int FlyMode = VTK_FLY_CLOSEST_TRIAD;
717 
718  // Expose internally closest axis index computation
719  int FindClosestAxisIndex(double pts[8][3]);
720 
721  // Expose internally furthest axis index computation
722  int FindFurtherstAxisIndex(double pts[8][3]);
723 
724  // Expose internally the boundary edge fly mode axis index computation
725  void FindBoundaryEdge(int& indexOfAxisX, int& indexOfAxisY, int& indexOfAxisZ, double pts[8][3]);
726 
732  void UpdateGridLineVisibility(int axisIndex);
733 
734  // VTK_ALL_GRID_LINES 0
735  // VTK_CLOSEST_GRID_LINES 1
736  // VTK_FURTHEST_GRID_LINES 2
737  int GridLineLocation = VTK_GRID_LINES_ALL;
738 
742  bool StickyAxes = false;
743 
747  bool CenterStickyAxes = true;
748 
753  bool EnableDistanceLOD = true;
754 
759  double DistanceLODThreshold = 0.8;
760 
765  bool EnableViewAngleLOD = true;
766 
771  double ViewAngleLODThreshold = 0.2;
772 
774  {
775  NUMBER_OF_ALIGNED_AXIS = 4
776  };
777 
779 
783  vtkAxisActor* XAxes[NUMBER_OF_ALIGNED_AXIS];
784  vtkAxisActor* YAxes[NUMBER_OF_ALIGNED_AXIS];
785  vtkAxisActor* ZAxes[NUMBER_OF_ALIGNED_AXIS];
787 
788  bool RebuildAxes = true;
789 
790  char* XTitle = nullptr;
791  char* XUnits = nullptr;
792  char* YTitle = nullptr;
793  char* YUnits = nullptr;
794  char* ZTitle = nullptr;
795  char* ZUnits = nullptr;
796 
797  char* ActualXLabel = nullptr;
798  char* ActualYLabel = nullptr;
799  char* ActualZLabel = nullptr;
800 
801  int TickLocation = VTK_TICKS_INSIDE;
802 
803  bool XAxisVisibility = true;
804  bool YAxisVisibility = true;
805  bool ZAxisVisibility = true;
806 
807  bool XAxisTickVisibility = true;
808  bool YAxisTickVisibility = true;
809  bool ZAxisTickVisibility = true;
810 
811  bool XAxisMinorTickVisibility = true;
812  bool YAxisMinorTickVisibility = true;
813  bool ZAxisMinorTickVisibility = true;
814 
815  bool XAxisLabelVisibility = true;
816  bool YAxisLabelVisibility = true;
817  bool ZAxisLabelVisibility = true;
818 
819  bool DrawXGridlines = false;
820  bool DrawYGridlines = false;
821  bool DrawZGridlines = false;
822 
823  bool DrawXInnerGridlines = false;
824  bool DrawYInnerGridlines = false;
825  bool DrawZInnerGridlines = false;
826 
827  bool DrawXGridpolys = false;
828  bool DrawYGridpolys = false;
829  bool DrawZGridpolys = false;
830 
831  char* XLabelFormat = nullptr;
832  char* YLabelFormat = nullptr;
833  char* ZLabelFormat = nullptr;
834 
835  double CornerOffset = 0.0;
836 
837  int Inertia = 1;
838 
839  int RenderCount = 0;
840 
841  int InertiaLocs[3] = { -1, -1, -1 };
842 
843  bool RenderSomething = false;
844 
845  vtkNew<vtkTextProperty> TitleTextProperty[3];
847  vtkNew<vtkTextProperty> LabelTextProperty[3];
848 
861 
862  double RenderedBounds[6] = { -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 };
863  double OrientedBounds[6] = { -1.0, 1.0, -1.0, 1.0, -1.0, 1.0 };
864  bool UseOrientedBounds = false;
865 
866  double AxisOrigin[3] = { 0.0, 0.0, 0.0 };
867  bool UseAxisOrigin = false;
868 
869  double AxisBaseForX[3] = { 1.0, 0.0, 0.0 };
870  double AxisBaseForY[3] = { 0.0, 1.0, 0.0 };
871  double AxisBaseForZ[3] = { 0.0, 0.0, 1.0 };
872 
873 private:
874  vtkCubeAxesActor(const vtkCubeAxesActor&) = delete;
875  void operator=(const vtkCubeAxesActor&) = delete;
876 
877  vtkSetStringMacro(ActualXLabel);
878  vtkSetStringMacro(ActualYLabel);
879  vtkSetStringMacro(ActualZLabel);
880 
881  vtkTimeStamp BuildTime;
882  bool LastUseOrientedBounds = false;
883  int LastXPow = 0;
884  int LastYPow = 0;
885  int LastZPow = 0;
886 
887  int UserXPow = 0;
888  int UserYPow = 0;
889  int UserZPow = 0;
890 
891  bool AutoLabelScaling = true;
892 
893  int LastXAxisDigits = 3;
894  int LastYAxisDigits = 3;
895  int LastZAxisDigits = 3;
896 
897  double LastXRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
898  double LastYRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
899  double LastZRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
900  double LastBounds[6] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX, VTK_DOUBLE_MAX, VTK_DOUBLE_MAX,
902 
903  int LastFlyMode = -1;
904 
905  int RenderAxesX[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
906  int RenderAxesY[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
907  int RenderAxesZ[NUMBER_OF_ALIGNED_AXIS] = { 0, 1, 2, 3 };
908 
909  int NumberOfAxesX = 1;
910  int NumberOfAxesY = 1;
911  int NumberOfAxesZ = 1;
912 
913  bool MustAdjustXValue = false;
914  bool MustAdjustYValue = false;
915  bool MustAdjustZValue = false;
916 
917  bool ForceXLabelReset = false;
918  bool ForceYLabelReset = false;
919  bool ForceZLabelReset = false;
920 
921  double XAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
922  double YAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
923  double ZAxisRange[2] = { VTK_DOUBLE_MAX, VTK_DOUBLE_MAX };
924 
925  double LabelScale = -1.0;
926  double TitleScale = -1.0;
927 
928  double ScreenSize = 10.0;
929  double LabelOffset = 20.0;
930  double TitleOffset[2] = { 20.0, 20.0 };
931 
933 
937  double MajorStart[3] = { 0.0, 0.0, 0.0 };
938  double DeltaMajor[3] = { 0.0, 0.0, 0.0 };
940 
941  int RenderGeometry(bool& initialRender, vtkViewport* viewport, bool checkAxisVisibility,
942  int (vtkAxisActor::*renderMethod)(vtkViewport*));
943 
944  void TransformBounds(vtkViewport* viewport, const double bounds[6], double pts[8][3]);
945  void AdjustAxes(double bounds[6], double xCoords[NUMBER_OF_ALIGNED_AXIS][6],
946  double yCoords[NUMBER_OF_ALIGNED_AXIS][6], double zCoords[NUMBER_OF_ALIGNED_AXIS][6],
947  double xRange[2], double yRange[2], double zRange[2]);
948 
949  bool ComputeTickSize(double bounds[6]);
950  void AdjustValues(const double xRange[2], const double yRange[2], const double zRange[2]);
951  void AdjustRange(const double bounds[6]);
952  void BuildAxes(vtkViewport*);
953  void DetermineRenderAxes(vtkViewport*);
954  void SetNonDependentAttributes();
955  void BuildLabels(vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS]);
956  void AdjustTicksComputeRange(
957  vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS], double rangeMin, double rangeMax);
958 
959  void AutoScale(vtkViewport* viewport);
960  void AutoScale(vtkViewport* viewport, vtkAxisActor* axes[NUMBER_OF_ALIGNED_AXIS]);
961  double AutoScale(vtkViewport* viewport, double screenSize, double position[3]);
962 };
963 
964 VTK_ABI_NAMESPACE_END
965 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:150
Create an axis with tick marks and labels.
Definition: vtkAxisActor.h:89
a virtual camera for 3D rendering
Definition: vtkCamera.h:150
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:446
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
represent surface properties of a geometric object
Definition: vtkProperty.h:166
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:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:47
@ 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)