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 
35 
37 class vtkPoints;
38 class vtkPolyData;
39 class vtkPolyDataMapper;
40 class vtkActor;
41 class vtkVectorText;
42 class vtkFollower;
43 class vtkBox;
44 class vtkCylinderSource;
45 class vtkGlyph3D;
46 class vtkDoubleArray;
48 class vtkProperty;
49 
50 
52 {
53 public:
56 
58 
60  void PrintSelf(ostream& os, vtkIndent indent);
62 
64 
67  vtkGetObjectMacro(OriginRepresentation,vtkHandleRepresentation);
68  vtkGetObjectMacro(SelectionRepresentation,vtkHandleRepresentation);
70 
72 
75  double* GetOriginWorldPosition();
76  void GetOriginWorldPosition(double pos[3]);
77  void SetOriginWorldPosition(double pos[3]);
78  void SetOriginDisplayPosition(double pos[3]);
79  void GetOriginDisplayPosition(double pos[3]);
81 
89  vtkSetClampMacro(Tolerance,int,1,100);
90  vtkGetMacro(Tolerance,int);
92 
94 
97  vtkSetStringMacro(LabelFormat);
98  vtkGetStringMacro(LabelFormat);
100 
102  enum {Outside=0,OnOrigin,OnX,OnY,OnZ,OnXEnd,OnYEnd,OnZEnd};
103 
105 
112  vtkSetClampMacro(InteractionState,int,Outside,OnZEnd);
114 
116 
117  virtual void BuildRepresentation();
118  virtual int ComputeInteractionState(int X, int Y, int modify=0);
119  virtual void StartWidgetInteraction(double e[2]);
120  virtual void WidgetInteraction(double e[2]);
121  virtual double *GetBounds();
123 
125 
126  virtual void ReleaseGraphicsResources(vtkWindow *w);
127  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
128  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
130 
132 
134  void SetLabelScale(double x, double y, double z)
135  {
136  double scale[3];
137  scale[0] = x;
138  scale[1] = y;
139  scale[2] = z;
140  this->SetLabelScale(scale);
141  }
142  virtual void SetLabelScale( double scale[3] );
143  virtual double * GetLabelScale();
145 
147  virtual vtkProperty *GetLabelProperty();
148 
149 protected:
152 
153  // The handle and the rep used to close the handles
156 
157  // Selection tolerance for the handles
159 
160  // Format for printing the distance
161  char *LabelFormat;
162 
163  // The line
168 
169  // The distance label
173 
174  // The 3D disk tick marks
183 
184  // Support GetBounds() method
186 
187  double LastEventPosition[3];
188 
189 private:
191  void operator=(const vtkAxesTransformRepresentation&); //Not implemented
192 };
193 
194 #endif