VTK
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
52
53class VTKINTERACTIONWIDGETS_EXPORT vtkAxesTransformRepresentation : public vtkWidgetRepresentation
54{
55public:
60
62
66 void PrintSelf(ostream& os, vtkIndent indent);
68
70
75 vtkGetObjectMacro(OriginRepresentation,vtkHandleRepresentation);
76 vtkGetObjectMacro(SelectionRepresentation,vtkHandleRepresentation);
78
80
86 void GetOriginWorldPosition(double pos[3]);
87 void SetOriginWorldPosition(double pos[3]);
88 void SetOriginDisplayPosition(double pos[3]);
89 void GetOriginDisplayPosition(double pos[3]);
91
103 vtkSetClampMacro(Tolerance,int,1,100);
104 vtkGetMacro(Tolerance,int);
106
108
113 vtkSetStringMacro(LabelFormat);
114 vtkGetStringMacro(LabelFormat);
116
120 enum {Outside=0,OnOrigin,OnX,OnY,OnZ,OnXEnd,OnYEnd,OnZEnd};
121
123
132 vtkSetClampMacro(InteractionState,int,Outside,OnZEnd);
134
136
139 virtual void BuildRepresentation();
140 virtual int ComputeInteractionState(int X, int Y, int modify=0);
141 virtual void StartWidgetInteraction(double e[2]);
142 virtual void WidgetInteraction(double e[2]);
143 virtual double *GetBounds();
145
147
151 virtual int RenderOpaqueGeometry(vtkViewport *viewport);
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
176
177protected:
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
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
217private:
219 void operator=(const vtkAxesTransformRepresentation&) VTK_DELETE_FUNCTION;
220};
221
222#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:52
represent the vtkAxesTransformWidget
virtual double * GetLabelScale()
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
virtual void BuildRepresentation()
Method to satisfy superclasses' API.
void SetLabelScale(double x, double y, double z)
Scale text (font size along each dimension).
vtkHandleRepresentation * SelectionRepresentation
virtual void StartWidgetInteraction(double e[2])
void GetOriginWorldPosition(double pos[3])
virtual void ReleaseGraphicsResources(vtkWindow *w)
Methods required by vtkProp superclass.
void SetOriginDisplayPosition(double pos[3])
static vtkAxesTransformRepresentation * New()
Instantiate class.
virtual vtkProperty * GetLabelProperty()
Get the distance annotation property.
void GetOriginDisplayPosition(double pos[3])
virtual double * GetBounds()
Methods to make this class behave as a vtkProp.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
double * GetOriginWorldPosition()
Methods to Set/Get the coordinates of the two points defining this representation.
virtual void SetLabelScale(double scale[3])
void SetOriginWorldPosition(double pos[3])
virtual void WidgetInteraction(double e[2])
virtual int ComputeInteractionState(int X, int Y, int modify=0)
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)
implicit function for a bounding box
Definition: vtkBox.h:42
generate a cylinder centered at origin
dynamic, self-adjusting array of double
a subclass of actor that always faces the camera
Definition: vtkFollower.h:47
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:112
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:86
represent surface properties of a geometric object
Definition: vtkProperty.h:65
transform points and associated normals and vectors for polygonal dataset
create polygonal text
Definition: vtkVectorText.h:48
abstract specification for Viewports
Definition: vtkViewport.h:48
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
@ scale
Definition: vtkX3D.h:229
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.