VTK  9.3.0
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
26VTK_ABI_NAMESPACE_BEGIN
28class vtkPoints;
29class vtkPolyData;
31class vtkActor;
32class vtkVectorText;
33class vtkFollower;
34class vtkBox;
36class vtkGlyph3D;
37class vtkDoubleArray;
39class vtkProperty;
40
41class VTKINTERACTIONWIDGETS_EXPORT vtkAxesTransformRepresentation : public vtkWidgetRepresentation
42{
43public:
48
50
54 void PrintSelf(ostream& os, vtkIndent indent) override;
56
58
63 vtkGetObjectMacro(OriginRepresentation, vtkHandleRepresentation);
64 vtkGetObjectMacro(SelectionRepresentation, vtkHandleRepresentation);
66
68
74 void GetOriginWorldPosition(double pos[3]);
75 void SetOriginWorldPosition(double pos[3]);
76 void SetOriginDisplayPosition(double pos[3]);
77 void GetOriginDisplayPosition(double pos[3]);
79
86
91 vtkSetClampMacro(Tolerance, int, 1, 100);
92 vtkGetMacro(Tolerance, int);
94
96
101 vtkSetStringMacro(LabelFormat);
102 vtkGetStringMacro(LabelFormat);
104
108 enum
109 {
110 Outside = 0,
117 OnZEnd
118 };
119
121
130 vtkSetClampMacro(InteractionState, int, Outside, OnZEnd);
132
134
137 void BuildRepresentation() override;
138 int ComputeInteractionState(int X, int Y, int modify = 0) override;
139 void StartWidgetInteraction(double e[2]) override;
140 void WidgetInteraction(double e[2]) override;
141 double* GetBounds() override;
143
145
149 int RenderOpaqueGeometry(vtkViewport* viewport) override;
152
154
158 void SetLabelScale(double x, double y, double z)
159 {
160 double scale[3];
161 scale[0] = x;
162 scale[1] = y;
163 scale[2] = z;
164 this->SetLabelScale(scale);
165 }
166 virtual void SetLabelScale(double scale[3]);
167 virtual double* GetLabelScale();
169
174
175protected:
178
179 // The handle and the rep used to close the handles
182
183 // Selection tolerance for the handles
185
186 // Format for printing the distance
188
189 // The line
194
195 // The distance label
199
200 // The 3D disk tick marks
209
210 // Support GetBounds() method
212
213 double LastEventPosition[3];
214
215private:
217 void operator=(const vtkAxesTransformRepresentation&) = delete;
218};
219
220VTK_ABI_NAMESPACE_END
221#endif
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:41
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:31
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:33
copy oriented and scaled glyph geometry to every input point
Definition vtkGlyph3D.h:102
abstract class for representing widget handles
a simple class to control print indentation
Definition vtkIndent.h:29
represent and manipulate 3D points
Definition vtkPoints.h:29
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:80
represent surface properties of a geometric object
Definition vtkProperty.h:57
transform points and associated normals and vectors for polygonal dataset
create polygonal text
abstract specification for Viewports
Definition vtkViewport.h:45
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition vtkWindow.h:25