VTK  9.2.6
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
39class vtkPoints;
40class vtkPolyData;
42class vtkActor;
43class vtkVectorText;
44class vtkFollower;
45class vtkBox;
47class vtkGlyph3D;
48class vtkDoubleArray;
50class vtkProperty;
51
52class VTKINTERACTIONWIDGETS_EXPORT vtkAxesTransformRepresentation : public vtkWidgetRepresentation
53{
54public:
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
186protected:
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
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
226private:
228 void operator=(const vtkAxesTransformRepresentation&) = delete;
229};
230
231#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
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:42
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:44
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:113
abstract class for representing widget handles
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate 3D points
Definition: vtkPoints.h:40
map vtkPolyData to graphics primitives
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:91
represent surface properties of a geometric object
Definition: vtkProperty.h:68
transform points and associated normals and vectors for polygonal dataset
create polygonal text
Definition: vtkVectorText.h:48
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