VTK  9.0.1
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 =========================================================================*/
29 #ifndef vtkAxesTransformRepresentation_h
30 #define vtkAxesTransformRepresentation_h
31 
32 #include "vtkInteractionWidgetsModule.h" // For export macro
34 
36 class vtkPoints;
37 class vtkPolyData;
38 class vtkPolyDataMapper;
39 class vtkActor;
40 class vtkVectorText;
41 class vtkFollower;
42 class vtkBox;
43 class vtkCylinderSource;
44 class vtkGlyph3D;
45 class vtkDoubleArray;
47 class vtkProperty;
48 
49 class VTKINTERACTIONWIDGETS_EXPORT vtkAxesTransformRepresentation : public vtkWidgetRepresentation
50 {
51 public:
56 
58 
62  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
66 
71  vtkGetObjectMacro(OriginRepresentation, vtkHandleRepresentation);
72  vtkGetObjectMacro(SelectionRepresentation, vtkHandleRepresentation);
74 
76 
82  void GetOriginWorldPosition(double pos[3]);
83  void SetOriginWorldPosition(double pos[3]);
84  void SetOriginDisplayPosition(double pos[3]);
85  void GetOriginDisplayPosition(double pos[3]);
87 
99  vtkSetClampMacro(Tolerance, int, 1, 100);
100  vtkGetMacro(Tolerance, int);
102 
104 
109  vtkSetStringMacro(LabelFormat);
110  vtkGetStringMacro(LabelFormat);
112 
116  enum
117  {
118  Outside = 0,
125  OnZEnd
126  };
127 
129 
138  vtkSetClampMacro(InteractionState, int, Outside, OnZEnd);
140 
142 
145  void BuildRepresentation() override;
146  int ComputeInteractionState(int X, int Y, int modify = 0) override;
147  void StartWidgetInteraction(double e[2]) override;
148  void WidgetInteraction(double e[2]) override;
149  double* GetBounds() override;
151 
153 
157  int RenderOpaqueGeometry(vtkViewport* viewport) override;
160 
162 
166  void SetLabelScale(double x, double y, double z)
167  {
168  double scale[3];
169  scale[0] = x;
170  scale[1] = y;
171  scale[2] = z;
172  this->SetLabelScale(scale);
173  }
174  virtual void SetLabelScale(double scale[3]);
175  virtual double* GetLabelScale();
177 
182 
183 protected:
186 
187  // The handle and the rep used to close the handles
190 
191  // Selection tolerance for the handles
193 
194  // Format for printing the distance
195  char* LabelFormat;
196 
197  // The line
202 
203  // The distance label
207 
208  // The 3D disk tick marks
217 
218  // Support GetBounds() method
220 
221  double LastEventPosition[3];
222 
223 private:
225  void operator=(const vtkAxesTransformRepresentation&) = delete;
226 };
227 
228 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:46
represent the vtkAxesTransformWidget
void BuildRepresentation() override
Method to satisfy superclasses' API.
~vtkAxesTransformRepresentation() override
void WidgetInteraction(double e[2]) override
void SetLabelScale(double x, double y, double z)
Scale text (font size along each dimension).
vtkHandleRepresentation * SelectionRepresentation
void GetOriginWorldPosition(double pos[3])
int RenderOpaqueGeometry(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
int ComputeInteractionState(int X, int Y, int modify=0) override
void StartWidgetInteraction(double e[2]) override
void SetOriginDisplayPosition(double pos[3])
void GetOriginDisplayPosition(double pos[3])
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual double * GetLabelScale()
double * GetBounds() override
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
static vtkAxesTransformRepresentation * New()
Instantiate class.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
virtual void SetLabelScale(double scale[3])
void ReleaseGraphicsResources(vtkWindow *w) override
Methods required by vtkProp superclass.
void SetOriginWorldPosition(double pos[3])
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:39
generate a cylinder centered at origin
dynamic, self-adjusting array of double
a subclass of actor that always faces the camera
Definition: vtkFollower.h:41
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:106
abstract class for representing widget handles
a simple class to control print indentation
Definition: vtkIndent.h:34
represent and manipulate 3D points
Definition: vtkPoints.h:34
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
represent surface properties of a geometric object
Definition: vtkProperty.h:62
transform points and associated normals and vectors for polygonal dataset
create polygonal text
Definition: vtkVectorText.h:42
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:35
@ scale
Definition: vtkX3D.h:235