VTK  9.4.20250212
vtkAxesTransformRepresentation.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
20#ifndef vtkAxesTransformRepresentation_h
21#define vtkAxesTransformRepresentation_h
22
23#include "vtkInteractionWidgetsModule.h" // For export macro
25#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
26
27VTK_ABI_NAMESPACE_BEGIN
29class vtkPoints;
30class vtkPolyData;
32class vtkActor;
33class vtkVectorText;
34class vtkFollower;
35class vtkBox;
37class vtkGlyph3D;
38class vtkDoubleArray;
40class vtkProperty;
41
42class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkAxesTransformRepresentation
44{
45public:
50
52
56 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
65 vtkGetObjectMacro(OriginRepresentation, vtkHandleRepresentation);
66 vtkGetObjectMacro(SelectionRepresentation, vtkHandleRepresentation);
68
70
76 void GetOriginWorldPosition(double pos[3]);
77 void SetOriginWorldPosition(double pos[3]);
78 void SetOriginDisplayPosition(double pos[3]);
79 void GetOriginDisplayPosition(double pos[3]);
81
88
93 vtkSetClampMacro(Tolerance, int, 1, 100);
94 vtkGetMacro(Tolerance, int);
96
98
103 vtkSetStringMacro(LabelFormat);
104 vtkGetStringMacro(LabelFormat);
106
110 enum
111 {
112 Outside = 0,
119 OnZEnd
120 };
121
123
132 vtkSetClampMacro(InteractionState, int, Outside, OnZEnd);
134
136
139 void BuildRepresentation() override;
140 int ComputeInteractionState(int X, int Y, int modify = 0) override;
141 void StartWidgetInteraction(double e[2]) override;
142 void WidgetInteraction(double e[2]) override;
143 double* GetBounds() override;
145
147
151 int RenderOpaqueGeometry(vtkViewport* viewport) override;
154
156
160 void SetLabelScale(double x, double y, double z)
161 {
162 double scale[3];
163 scale[0] = x;
164 scale[1] = y;
165 scale[2] = z;
166 this->SetLabelScale(scale);
167 }
168 virtual void SetLabelScale(double scale[3]);
169 virtual double* GetLabelScale();
171
176
177protected:
180
181 // The handle and the rep used to close the handles
184
185 // Selection tolerance for the handles
187
188 // Format for printing the distance
190
191 // The line
196
197 // The distance label
201
202 // The 3D disk tick marks
211
212 // Support GetBounds() method
214
215 double LastEventPosition[3];
216
217private:
219 void operator=(const vtkAxesTransformRepresentation&) = delete;
220};
221
222VTK_ABI_NAMESPACE_END
223#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
represent the vtkAxesTransformWidget
virtual double * GetLabelScale()
Scale text (font size along each dimension).
void BuildRepresentation() override
Method to satisfy superclasses' API.
~vtkAxesTransformRepresentation() override
void WidgetInteraction(double e[2]) override
Method to satisfy superclasses' API.
void SetLabelScale(double x, double y, double z)
Scale text (font size along each dimension).
void GetOriginWorldPosition(double pos[3])
Methods to Set/Get the coordinates of the two points defining this representation.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods required by vtkProp superclass.
int ComputeInteractionState(int X, int Y, int modify=0) override
Method to satisfy superclasses' API.
void StartWidgetInteraction(double e[2]) override
Method to satisfy superclasses' API.
void SetOriginDisplayPosition(double pos[3])
Methods to Set/Get the coordinates of the two points defining this representation.
static vtkAxesTransformRepresentation * New()
Instantiate class.
virtual vtkProperty * GetLabelProperty()
Get the distance annotation property.
void GetOriginDisplayPosition(double pos[3])
Methods to Set/Get the coordinates of the two points defining this representation.
double * GetBounds() override
Method to satisfy superclasses' API.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Methods required by vtkProp superclass.
double * GetOriginWorldPosition()
Methods to Set/Get the coordinates of the two points defining this representation.
virtual void SetLabelScale(double scale[3])
Scale text (font size along each dimension).
void ReleaseGraphicsResources(vtkWindow *w) override
Methods required by vtkProp superclass.
void SetOriginWorldPosition(double pos[3])
Methods to Set/Get the coordinates of the two points defining this representation.
implicit function for a bounding box
Definition vtkBox.h:110
generate a polygonal cylinder centered at the origin
dynamic, self-adjusting array of double
a subclass of actor that always faces the camera
Definition vtkFollower.h:92
copy oriented and scaled glyph geometry to every input point
Definition vtkGlyph3D.h:211
abstract class for representing widget handles
a simple class to control print indentation
Definition vtkIndent.h:108
represent and manipulate 3D points
Definition vtkPoints.h:139
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
represent surface properties of a geometric object
transform points and associated normals and vectors for polygonal dataset
create polygonal text
abstract specification for Viewports
Definition vtkViewport.h:65
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
#define VTK_MARSHALAUTO