VTK  9.2.5
vtkAxesTransformRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAxesTransformRepresentation.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
32 #ifndef vtkAxesTransformRepresentation_h
33 #define vtkAxesTransformRepresentation_h
34 
35 #include "vtkInteractionWidgetsModule.h" // For export macro
37 
39 class vtkPoints;
40 class vtkPolyData;
41 class vtkPolyDataMapper;
42 class vtkActor;
43 class vtkVectorText;
44 class vtkFollower;
45 class vtkBox;
46 class vtkCylinderSource;
47 class vtkGlyph3D;
48 class vtkDoubleArray;
50 class vtkProperty;
51 
52 class VTKINTERACTIONWIDGETS_EXPORT vtkAxesTransformRepresentation : public vtkWidgetRepresentation
53 {
54 public:
59 
61 
65  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
69 
74  vtkGetObjectMacro(OriginRepresentation, vtkHandleRepresentation);
75  vtkGetObjectMacro(SelectionRepresentation, vtkHandleRepresentation);
77 
79 
85  void GetOriginWorldPosition(double pos[3]);
86  void SetOriginWorldPosition(double pos[3]);
87  void SetOriginDisplayPosition(double pos[3]);
88  void GetOriginDisplayPosition(double pos[3]);
90 
97 
102  vtkSetClampMacro(Tolerance, int, 1, 100);
103  vtkGetMacro(Tolerance, int);
105 
107 
112  vtkSetStringMacro(LabelFormat);
113  vtkGetStringMacro(LabelFormat);
115 
119  enum
120  {
121  Outside = 0,
128  OnZEnd
129  };
130 
132 
141  vtkSetClampMacro(InteractionState, int, Outside, OnZEnd);
143 
145 
148  void BuildRepresentation() override;
149  int ComputeInteractionState(int X, int Y, int modify = 0) override;
150  void StartWidgetInteraction(double e[2]) override;
151  void WidgetInteraction(double e[2]) override;
152  double* GetBounds() override;
154 
156 
160  int RenderOpaqueGeometry(vtkViewport* viewport) override;
163 
165 
169  void SetLabelScale(double x, double y, double z)
170  {
171  double scale[3];
172  scale[0] = x;
173  scale[1] = y;
174  scale[2] = z;
175  this->SetLabelScale(scale);
176  }
177  virtual void SetLabelScale(double scale[3]);
178  virtual double* GetLabelScale();
180 
185 
186 protected:
189 
190  // The handle and the rep used to close the handles
193 
194  // Selection tolerance for the handles
196 
197  // Format for printing the distance
198  char* LabelFormat;
199 
200  // The line
205 
206  // The distance label
210 
211  // The 3D disk tick marks
220 
221  // Support GetBounds() method
223 
224  double LastEventPosition[3];
225 
226 private:
228  void operator=(const vtkAxesTransformRepresentation&) = delete;
229 };
230 
231 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:161
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:141
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:123
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:222
abstract class for representing widget handles
a simple class to control print indentation
Definition: vtkIndent.h:119
represent and manipulate 3D points
Definition: vtkPoints.h:149
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:200
represent surface properties of a geometric object
Definition: vtkProperty.h:177
transform points and associated normals and vectors for polygonal dataset
create polygonal text
abstract specification for Viewports
Definition: vtkViewport.h:56
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
@ scale
Definition: vtkX3D.h:235