VTK  9.7.20261004
vtkGridAxesRepresentation.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
3
51
52#ifndef vtkGridAxesRepresentation_h
53#define vtkGridAxesRepresentation_h
54
55#include "vtkNew.h" // For ivar
57#include "vtkViewsScivisModule.h" // For export macro
58
59VTK_ABI_NAMESPACE_BEGIN
61
62class VTKVIEWSSCIVIS_EXPORT vtkGridAxesRepresentation : public vtkScivisRepresentation
63{
64public:
67 void PrintSelf(ostream& os, vtkIndent indent) override;
68
70
73 void SetVisibility(bool val) override;
74 bool GetVisibility() override;
76
78
82 void SetPadding(double padding);
83 double GetPadding();
85
91
92protected:
95
96 bool AddToView(vtkScivisView* view) override;
97 bool RemoveFromView(vtkScivisView* view) override;
98
99private:
101 void operator=(const vtkGridAxesRepresentation&) = delete;
102
107 void OnBoundsChanged(vtkObject* caller, unsigned long event, void* bounds);
108
115 void Fit();
116
118 double Padding;
119 double SceneBounds[6];
120 bool HasSceneBounds;
121 // The observer on the view, so it can be taken off again when the axes are
122 // removed from it.
123 unsigned long ObserverTag;
124};
125
126VTK_ABI_NAMESPACE_END
127#endif
actor for a cube-axes like prop in the 3D view.
double GetPadding()
How much room to leave between the data and the axes, as a fraction of the size of the data.
void SetPadding(double padding)
How much room to leave between the data and the axes, as a fraction of the size of the data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool RemoveFromView(vtkScivisView *view) override
Called when this representation is added to or removed from a view.
static vtkGridAxesRepresentation * New()
vtkGridAxesActor3D * GetGridAxesActor()
The actor the axes are drawn by: which faces are drawn, the titles, the label formats,...
~vtkGridAxesRepresentation() override
bool AddToView(vtkScivisView *view) override
Called when this representation is added to or removed from a view.
void SetVisibility(bool val) override
Whether the axes are drawn.
bool GetVisibility() override
Whether the axes are drawn.
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:168
abstract base class for most VTK objects
Definition vtkObject.h:162