VTK  9.1.0
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
36class vtkPoints;
37class vtkPolyData;
39class vtkActor;
40class vtkVectorText;
41class vtkFollower;
42class vtkBox;
44class vtkGlyph3D;
45class vtkDoubleArray;
47class vtkProperty;
48
49class VTKINTERACTIONWIDGETS_EXPORT vtkAxesTransformRepresentation : public vtkWidgetRepresentation
50{
51public:
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
94
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
183protected:
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
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
223private:
225 void operator=(const vtkAxesTransformRepresentation&) = delete;
226};
227
228#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
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).
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.
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:138
generate a cylinder centered at origin
dynamic, self-adjusting array of double
a subclass of actor that always faces the camera
Definition: vtkFollower.h:120
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:216
abstract class for representing widget handles
a simple class to control print indentation
Definition: vtkIndent.h:113
represent and manipulate 3D points
Definition: vtkPoints.h:143
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
represent surface properties of a geometric object
Definition: vtkProperty.h:171
transform points and associated normals and vectors for polygonal dataset
create polygonal text
abstract specification for Viewports
Definition: vtkViewport.h:47
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
@ scale
Definition: vtkX3D.h:235