VTK  9.7.20261106
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
45
46#ifndef vtkGridAxesRepresentation_h
47#define vtkGridAxesRepresentation_h
48
49#include "vtkNew.h" // For ivar
51#include "vtkViewsScivisModule.h" // For export macro
52#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
53
54VTK_ABI_NAMESPACE_BEGIN
56
57class VTKVIEWSSCIVIS_EXPORT VTK_MARSHALAUTO vtkGridAxesRepresentation
59{
60public:
63 void PrintSelf(ostream& os, vtkIndent indent) override;
64
66
69 void SetVisibility(bool val) override;
70 bool GetVisibility() override;
72
74
78 void SetPadding(double padding);
79 double GetPadding();
81
83
86 void SetXTitle(const char* title);
87 const char* GetXTitle();
88 void SetYTitle(const char* title);
89 const char* GetYTitle();
90 void SetZTitle(const char* title);
91 const char* GetZTitle();
93
95
103 void SetLabelFontSize(int size);
105 void SetTitleFontSize(int size);
107 void SetLabelColor(double r, double g, double b);
109 void SetTitleColor(double r, double g, double b);
112
118
119protected:
122
123 bool AddToView(vtkScivisView* view) override;
124 bool RemoveFromView(vtkScivisView* view) override;
125
126private:
128 void operator=(const vtkGridAxesRepresentation&) = delete;
129
134 void OnBoundsChanged(vtkObject* caller, unsigned long event, void* bounds);
135
142 void Fit();
143
145 double Padding;
146 double SceneBounds[6];
147 bool HasSceneBounds;
148 // The observer on the view, so it can be taken off again when the axes are
149 // removed from it.
150 unsigned long ObserverTag;
151};
152
153VTK_ABI_NAMESPACE_END
154#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.
double * GetLabelColor()
How the numbers along the axes and the titles are drawn.
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 SetTitleFontSize(int size)
How the numbers along the axes and the titles are drawn.
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.
const char * GetZTitle()
What the axes are called.
void SetZTitle(const char *title)
What the axes are called.
const char * GetXTitle()
What the axes are called.
double * GetTitleColor()
How the numbers along the axes and the titles are drawn.
void SetYTitle(const char *title)
What the axes are called.
void SetLabelColor(double r, double g, double b)
How the numbers along the axes and the titles are drawn.
static vtkGridAxesRepresentation * New()
vtkGridAxesActor3D * GetGridAxesActor()
The actor the axes are drawn by: which faces are drawn, the label formats, the fonts per axis and the...
void SetTitleColor(double r, double g, double b)
How the numbers along the axes and the titles are drawn.
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.
const char * GetYTitle()
What the axes are called.
void SetLabelFontSize(int size)
How the numbers along the axes and the titles are drawn.
int GetLabelFontSize()
How the numbers along the axes and the titles are drawn.
void SetXTitle(const char *title)
What the axes are called.
int GetTitleFontSize()
How the numbers along the axes and the titles 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
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO