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 =========================================================================*/
31 #ifndef vtkAxesTransformRepresentation_h
32 #define vtkAxesTransformRepresentation_h
33 
34 #include "vtkInteractionWidgetsModule.h" // For export macro
36 
38 class vtkPoints;
39 class vtkPolyData;
40 class vtkPolyDataMapper;
41 class vtkActor;
42 class vtkVectorText;
43 class vtkFollower;
44 class vtkBox;
45 class vtkCylinderSource;
46 class vtkGlyph3D;
47 class vtkDoubleArray;
49 class vtkProperty;
50 
51 
53 {
54 public:
57 
59 
61  void PrintSelf(ostream& os, vtkIndent indent);
63 
65 
68  vtkGetObjectMacro(OriginRepresentation,vtkHandleRepresentation);
69  vtkGetObjectMacro(SelectionRepresentation,vtkHandleRepresentation);
71 
73 
76  double* GetOriginWorldPosition();
77  void GetOriginWorldPosition(double pos[3]);
78  void SetOriginWorldPosition(double pos[3]);
79  void SetOriginDisplayPosition(double pos[3]);
80  void GetOriginDisplayPosition(double pos[3]);
82 
90  vtkSetClampMacro(Tolerance,int,1,100);
91  vtkGetMacro(Tolerance,int);
93 
95 
98  vtkSetStringMacro(LabelFormat);
99  vtkGetStringMacro(LabelFormat);
101 
103  enum {Outside=0,OnOrigin,OnX,OnY,OnZ,OnXEnd,OnYEnd,OnZEnd};
104 
106 
113  vtkSetClampMacro(InteractionState,int,Outside,OnZEnd);
115 
117 
118  virtual void BuildRepresentation();
119  virtual int ComputeInteractionState(int X, int Y, int modify=0);
120  virtual void StartWidgetInteraction(double e[2]);
121  virtual void WidgetInteraction(double e[2]);
122  virtual double *GetBounds();
124 
126 
127  virtual void ReleaseGraphicsResources(vtkWindow *w);
128  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
129  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
131 
133 
135  void SetLabelScale(double x, double y, double z)
136  {
137  double scale[3];
138  scale[0] = x;
139  scale[1] = y;
140  scale[2] = z;
141  this->SetLabelScale(scale);
142  }
143  virtual void SetLabelScale( double scale[3] );
144  virtual double * GetLabelScale();
146 
148  virtual vtkProperty *GetLabelProperty();
149 
150 protected:
153 
154  // The handle and the rep used to close the handles
157 
158  // Selection tolerance for the handles
160 
161  // Format for printing the distance
162  char *LabelFormat;
163 
164  // The line
169 
170  // The distance label
174 
175  // The 3D disk tick marks
184 
185  // Support GetBounds() method
187 
188  double LastEventPosition[3];
189 
190 private:
192  void operator=(const vtkAxesTransformRepresentation&); //Not implemented
193 };
194 
195 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
generate a cylinder centered at origin
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract class for representing widget handles
abstract specification for Viewports
Definition: vtkViewport.h:46
represent surface properties of a geometric object
Definition: vtkProperty.h:63
virtual void StartWidgetInteraction(double eventPos[2])
vtkHandleRepresentation * SelectionRepresentation
transform points and associated normals and vectors for polygonal dataset
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
represent the vtkAxesTransformWidget
virtual void ReleaseGraphicsResources(vtkWindow *)
abstract class defines interface between the widget and widget representation classes ...
virtual void BuildRepresentation()=0
void SetLabelScale(double x, double y, double z)
dynamic, self-adjusting array of double
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:110
virtual void WidgetInteraction(double newEventPos[2])
map vtkPolyData to graphics primitives
virtual int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport))
a subclass of actor that always faces the camera
Definition: vtkFollower.h:45
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
implicit function for a bounding box
Definition: vtkBox.h:40
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport))
represent and manipulate 3D points
Definition: vtkPoints.h:38
create polygonal text
Definition: vtkVectorText.h:46