VTK  9.3.20240328
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 
26 VTK_ABI_NAMESPACE_BEGIN
28 class vtkPoints;
29 class vtkPolyData;
30 class vtkPolyDataMapper;
31 class vtkActor;
32 class vtkVectorText;
33 class vtkFollower;
34 class vtkBox;
35 class vtkCylinderSource;
36 class vtkGlyph3D;
37 class vtkDoubleArray;
39 class vtkProperty;
40 
41 class VTKINTERACTIONWIDGETS_EXPORT vtkAxesTransformRepresentation : public vtkWidgetRepresentation
42 {
43 public:
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 
175 protected:
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
187  char* LabelFormat;
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 
215 private:
217  void operator=(const vtkAxesTransformRepresentation&) = delete;
218 };
219 
220 VTK_ABI_NAMESPACE_END
221 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:150
represent the vtkAxesTransformWidget
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).
vtkHandleRepresentation * SelectionRepresentation
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.
void GetOriginDisplayPosition(double pos[3])
Methods to Set/Get the coordinates of the two points defining this representation.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
virtual double * GetLabelScale()
Scale text (font size along each dimension).
double * GetBounds() override
Method to satisfy superclasses' API.
static vtkAxesTransformRepresentation * New()
Instantiate class.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Methods required by vtkProp superclass.
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.
virtual vtkProperty * GetLabelProperty()
Get the distance annotation property.
double * GetOriginWorldPosition()
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:138
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:180
represent surface properties of a geometric object
Definition: vtkProperty.h:166
transform points and associated normals and vectors for polygonal dataset
create polygonal text
abstract specification for Viewports
Definition: vtkViewport.h:64
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition: vtkWindow.h:47
@ scale
Definition: vtkX3D.h:229