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 
69  vtkGetObjectMacro(SelectionRepresentation,vtkHandleRepresentation);
71 
73 
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 
128  virtual int RenderOpaqueGeometry(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 
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
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:42
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkWidgetRepresentation.h
vtkgl::z
GLdouble GLdouble z
Definition: vtkgl.h:11754
vtkAxesTransformRepresentation::~vtkAxesTransformRepresentation
~vtkAxesTransformRepresentation()
vtkFollower
a subclass of actor that always faces the camera
Definition: vtkFollower.h:46
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkAxesTransformRepresentation::vtkAxesTransformRepresentation
vtkAxesTransformRepresentation()
vtkAxesTransformRepresentation::LabelMapper
vtkPolyDataMapper * LabelMapper
Definition: vtkAxesTransformRepresentation.h:172
vtkAxesTransformRepresentation::GetOriginDisplayPosition
void GetOriginDisplayPosition(double pos[3])
vtkAxesTransformRepresentation::ComputeInteractionState
virtual int ComputeInteractionState(int X, int Y, int modify=0)
vtkgl::scale
GLenum GLenum GLenum GLenum GLenum scale
Definition: vtkgl.h:15942
vtkAxesTransformRepresentation::SetLabelScale
void SetLabelScale(double x, double y, double z)
Definition: vtkAxesTransformRepresentation.h:135
vtkAxesTransformRepresentation::GlyphCylinder
vtkCylinderSource * GlyphCylinder
Definition: vtkAxesTransformRepresentation.h:179
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:54
vtkHandleRepresentation
abstract class for representing widget handles
Definition: vtkHandleRepresentation.h:58
vtkAxesTransformRepresentation::LinePoints
vtkPoints * LinePoints
Definition: vtkAxesTransformRepresentation.h:165
vtkAxesTransformRepresentation::BuildRepresentation
virtual void BuildRepresentation()
vtkAxesTransformRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkAxesTransformRepresentation::GetOriginWorldPosition
double * GetOriginWorldPosition()
vtkInteractionWidgetsModule.h
vtkAxesTransformRepresentation::LabelText
vtkVectorText * LabelText
Definition: vtkAxesTransformRepresentation.h:171
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkAxesTransformRepresentation::LineMapper
vtkPolyDataMapper * LineMapper
Definition: vtkAxesTransformRepresentation.h:167
vtkAxesTransformRepresentation::WidgetInteraction
virtual void WidgetInteraction(double e[2])
vtkAxesTransformRepresentation::Glyph3D
vtkGlyph3D * Glyph3D
Definition: vtkAxesTransformRepresentation.h:181
vtkAxesTransformRepresentation::OriginRepresentation
vtkHandleRepresentation * OriginRepresentation
Definition: vtkAxesTransformRepresentation.h:155
vtkVectorText
create polygonal text
Definition: vtkVectorText.h:47
vtkAxesTransformRepresentation::Tolerance
int Tolerance
Definition: vtkAxesTransformRepresentation.h:159
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkAxesTransformRepresentation::RenderTranslucentPolygonalGeometry
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkAxesTransformRepresentation::SelectionRepresentation
vtkHandleRepresentation * SelectionRepresentation
Definition: vtkAxesTransformRepresentation.h:156
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkAxesTransformRepresentation::GlyphVectors
vtkDoubleArray * GlyphVectors
Definition: vtkAxesTransformRepresentation.h:177
vtkAxesTransformRepresentation::GlyphMapper
vtkPolyDataMapper * GlyphMapper
Definition: vtkAxesTransformRepresentation.h:182
vtkAxesTransformRepresentation::BoundingBox
vtkBox * BoundingBox
Definition: vtkAxesTransformRepresentation.h:186
vtkAxesTransformRepresentation::LabelActor
vtkFollower * LabelActor
Definition: vtkAxesTransformRepresentation.h:173
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkCylinderSource
generate a cylinder centered at origin
Definition: vtkCylinderSource.h:42
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
vtkTransformPolyDataFilter
transform points and associated normals and vectors for polygonal dataset
Definition: vtkTransformPolyDataFilter.h:51
vtkAxesTransformRepresentation::New
static vtkAxesTransformRepresentation * New()
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkAxesTransformRepresentation::GetOriginWorldPosition
void GetOriginWorldPosition(double pos[3])
vtkAxesTransformRepresentation::SetOriginWorldPosition
void SetOriginWorldPosition(double pos[3])
vtkAxesTransformRepresentation::RenderOpaqueGeometry
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
vtkGlyph3D
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:111
vtkAxesTransformRepresentation::GetLabelProperty
virtual vtkProperty * GetLabelProperty()
vtkBox
implicit function for a bounding box
Definition: vtkBox.h:41
vtkAxesTransformRepresentation::GlyphXForm
vtkTransformPolyDataFilter * GlyphXForm
Definition: vtkAxesTransformRepresentation.h:180
vtkAxesTransformRepresentation
represent the vtkAxesTransformWidget
Definition: vtkAxesTransformRepresentation.h:53
VTKINTERACTIONWIDGETS_EXPORT
#define VTKINTERACTIONWIDGETS_EXPORT
Definition: vtkInteractionWidgetsModule.h:15
vtkgl::y
GLint GLint GLint GLint GLint GLint y
Definition: vtkgl.h:11318
vtkAxesTransformRepresentation::GlyphPoints
vtkPoints * GlyphPoints
Definition: vtkAxesTransformRepresentation.h:176
vtkAxesTransformRepresentation::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *w)
vtkAxesTransformRepresentation::LinePolyData
vtkPolyData * LinePolyData
Definition: vtkAxesTransformRepresentation.h:166
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkAxesTransformRepresentation::GlyphPolyData
vtkPolyData * GlyphPolyData
Definition: vtkAxesTransformRepresentation.h:178
vtkAxesTransformRepresentation::StartWidgetInteraction
virtual void StartWidgetInteraction(double e[2])
vtkAxesTransformRepresentation::SetOriginDisplayPosition
void SetOriginDisplayPosition(double pos[3])
vtkAxesTransformRepresentation::GlyphActor
vtkActor * GlyphActor
Definition: vtkAxesTransformRepresentation.h:183
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:49
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:64
vtkgl::w
GLubyte GLubyte GLubyte GLubyte w
Definition: vtkgl.h:12054
vtkAxesTransformRepresentation::GetBounds
virtual double * GetBounds()
vtkAxesTransformRepresentation::GetLabelScale
virtual double * GetLabelScale()
vtkAxesTransformRepresentation::LabelFormat
char * LabelFormat
Definition: vtkAxesTransformRepresentation.h:162
vtkAxesTransformRepresentation::LineActor
vtkActor * LineActor
Definition: vtkAxesTransformRepresentation.h:168
vtkAxesTransformRepresentation::SetLabelScale
virtual void SetLabelScale(double scale[3])