VTK
vtkDistanceRepresentation3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDistanceRepresentation3D.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 vtkDistanceRepresentation3D_h
32 #define vtkDistanceRepresentation3D_h
33 
34 #include "vtkInteractionWidgetsModule.h" // For export macro
36 
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 
65  virtual double GetDistance()
66  {return this->Distance;}
68 
70 
72  void SetGlyphScale(double scale);
73  vtkGetMacro(GlyphScale, double);
75 
77  virtual vtkProperty *GetLineProperty();
78 
80 
82  void SetLabelPosition(double labelPosition);
83  vtkGetMacro(LabelPosition, double);
85 
87 
88  vtkSetClampMacro(MaximumNumberOfRulerTicks, int, 1, VTK_INT_MAX);
89  vtkGetMacro(MaximumNumberOfRulerTicks, int);
91 
93 
95  vtkGetObjectMacro(GlyphActor, vtkActor);
97 
99 
101  vtkGetObjectMacro(LabelActor, vtkFollower);
103 
105 
108  double* GetPoint1WorldPosition();
109  double* GetPoint2WorldPosition();
110  void GetPoint1WorldPosition(double pos[3]);
111  void GetPoint2WorldPosition(double pos[3]);
112  void SetPoint1WorldPosition(double pos[3]);
113  void SetPoint2WorldPosition(double pos[3]);
115 
116  void SetPoint1DisplayPosition(double pos[3]);
117  void SetPoint2DisplayPosition(double pos[3]);
118  void GetPoint1DisplayPosition(double pos[3]);
119  void GetPoint2DisplayPosition(double pos[3]);
120 
122 
123  virtual void BuildRepresentation();
124  virtual double *GetBounds();
126 
128 
129  virtual void ReleaseGraphicsResources(vtkWindow *w);
130  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
131  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
133 
135 
137  void SetLabelScale(double x, double y, double z)
138  {
139  double scale[3];
140  scale[0] = x;
141  scale[1] = y;
142  scale[2] = z;
143  this->SetLabelScale(scale);
144  }
145  virtual void SetLabelScale( double scale[3] );
146  virtual double * GetLabelScale();
148 
150  virtual vtkProperty *GetLabelProperty();
151 
152 protected:
155 
156  // The line
161 
162  // The distance label
166 
167  // Support internal operations
169 
170  // The 3D disk tick marks
179 
180  // Glyph3D scale
181  double GlyphScale;
183 
184  // The distance between the two points
185  double Distance;
186 
187  // Support GetBounds() method
189 
190  // Maximum number of ticks on the 3d ruler
192 
193  // Label title position
195 
196 private:
198  void operator=(const vtkDistanceRepresentation3D&); //Not implemented
199 
200  // Internal method to update the position of the label.
201  void UpdateLabelPosition();
202 };
203 
204 #endif
virtual void SetPoint1WorldPosition(double pos[3])=0
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
generate a cylinder centered at origin
virtual void SetPoint1DisplayPosition(double pos[3])=0
abstract specification for Viewports
Definition: vtkViewport.h:46
represent the vtkDistanceWidget
represent surface properties of a geometric object
Definition: vtkProperty.h:63
#define VTK_INT_MAX
Definition: vtkType.h:132
transform points and associated normals and vectors for polygonal dataset
virtual void GetPoint1DisplayPosition(double pos[3])=0
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
virtual void ReleaseGraphicsResources(vtkWindow *)
represent the vtkDistanceWidget
virtual void GetPoint2DisplayPosition(double pos[3])=0
dynamic, self-adjusting array of double
void PrintSelf(ostream &os, vtkIndent indent)
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
#define VTKINTERACTIONWIDGETS_EXPORT
virtual double * GetPoint1WorldPosition()=0
void SetLabelScale(double x, double y, double z)
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void BuildRepresentation()
copy oriented and scaled glyph geometry to every input point
Definition: vtkGlyph3D.h:110
virtual void SetPoint2DisplayPosition(double pos[3])=0
map vtkPolyData to graphics primitives
virtual double * GetPoint2WorldPosition()=0
virtual int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport))
a subclass of actor that always faces the camera
Definition: vtkFollower.h:45
vtkTransformPolyDataFilter * GlyphXForm
static vtkObject * New()
implicit function for a bounding box
Definition: vtkBox.h:40
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport))
virtual void SetPoint2WorldPosition(double pos[3])=0
represent and manipulate 3D points
Definition: vtkPoints.h:38
create polygonal text
Definition: vtkVectorText.h:46