VTK  9.7.1
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 
27 VTK_ABI_NAMESPACE_BEGIN
29 class vtkPoints;
30 class vtkPolyData;
31 class vtkPolyDataMapper;
32 class vtkActor;
33 class vtkVectorText;
34 class vtkFollower;
35 class vtkBox;
36 class vtkCylinderSource;
37 class vtkGlyph3D;
38 class vtkDoubleArray;
39 class vtkTransformFilter;
40 class vtkProperty;
41 
42 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkAxesTransformRepresentation
44 {
45 public:
50 
52 
56  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
65  vtkGetObjectMacro(OriginRepresentation, vtkHandleRepresentation);
66  vtkGetObjectMacro(SelectionRepresentation, vtkHandleRepresentation);
68 
70 
75  double* GetOriginWorldPosition();
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 
87 
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 
150  void ReleaseGraphicsResources(vtkWindow* w) override;
151  int RenderOpaqueGeometry(vtkViewport* viewport) override;
152  int RenderTranslucentPolygonalGeometry(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 
175  virtual vtkProperty* GetLabelProperty();
176 
177 protected:
179  ~vtkAxesTransformRepresentation() override;
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
189  char* LabelFormat;
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 
217 private:
219  void operator=(const vtkAxesTransformRepresentation&) = delete;
220 };
221 
222 VTK_ABI_NAMESPACE_END
223 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
generate a polygonal cylinder centered at the origin
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract class for representing widget handles
abstract specification for Viewports
Definition: vtkViewport.h:46
represent surface properties of a geometric object
Definition: vtkProperty.h:59
virtual void StartWidgetInteraction(double eventPos[2])
vtkHandleRepresentation * SelectionRepresentation
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
int RenderOpaqueGeometry(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
represent the vtkAxesTransformWidget
abstract class defines interface between the widget and widget representation classes ...
virtual void BuildRepresentation()=0
Subclasses of vtkWidgetRepresentation must implement these methods.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
void SetLabelScale(double x, double y, double z)
Scale text (font size along each dimension).
double * GetBounds() override
Methods to make this class behave as a vtkProp.
dynamic, self-adjusting array of double
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
a simple class to control print indentation
Definition: vtkIndent.h:28
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:102
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
virtual void WidgetInteraction(double newEventPos[2])
map vtkPolyData to graphics primitives
a subclass of actor that always faces the camera
Definition: vtkFollower.h:33
transform points and associated normals and vectors
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
implicit function for a bounding box
Definition: vtkBox.h:30
represent and manipulate 3D points
Definition: vtkPoints.h:30
create polygonal text
Definition: vtkVectorText.h:36