VTK
vtkPolygonalSurfacePointPlacer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolygonalSurfacePointPlacer.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 __vtkPolygonalSurfacePointPlacer_h
32 #define __vtkPolygonalSurfacePointPlacer_h
33 
34 #include "vtkPolyDataPointPlacer.h"
35 
37 class vtkCellPicker;
38 class vtkPolygonalSurfacePointPlacerInternals;
39 class vtkPolyData;
40 
41 //BTX
42 // The Node stores information about the point. This information is used by
43 // the interpolator. Reusing this information avoids the need for a second
44 // pick operation to regenerate it. (Cellpickers are slow).
46 {
47  double WorldPosition[3];
51  double ParametricCoords[3]; // parametric coords within cell
53 };
54 //ETX
55 
57  : public vtkPolyDataPointPlacer
58 {
59 public:
62 
64 
66  void PrintSelf(ostream& os, vtkIndent indent);
68 
69  // Descuription:
70  // Add /remove a prop, to place points on
71  virtual void AddProp( vtkProp * );
72  virtual void RemoveViewProp(vtkProp *prop);
73  virtual void RemoveAllProps();
74 
76 
81  virtual int ComputeWorldPosition( vtkRenderer *ren,
82  double displayPos[2],
83  double worldPos[3],
84  double worldOrient[9] );
86 
88 
91  virtual int ComputeWorldPosition( vtkRenderer *ren,
92  double displayPos[2],
93  double refWorldPos[3],
94  double worldPos[3],
95  double worldOrient[9] );
97 
100  virtual int ValidateWorldPosition( double worldPos[3] );
101 
103 
104  virtual int UpdateNodeWorldPosition( double worldPos[3],
105  vtkIdType nodePointId );
107 
109  virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] );
110 
112 
114  virtual int ValidateWorldPosition( double worldPos[3],
115  double worldOrient[9] );
117 
119 
120  vtkGetObjectMacro( CellPicker, vtkCellPicker );
122 
124 
126  vtkGetObjectMacro( Polys, vtkPolyDataCollection );
128 
130 
133  vtkSetMacro( DistanceOffset, double );
134  vtkGetMacro( DistanceOffset, double );
136 
138 
141  vtkSetMacro( SnapToClosestPoint, int );
142  vtkGetMacro( SnapToClosestPoint, int );
143  vtkBooleanMacro( SnapToClosestPoint, int );
145 
146 //BTX
148 
150  Node *GetNodeAtWorldPosition( double worldPos[3] );
151 //ETX
153 
154 protected:
157 
158  // The props that represents the terrain data (one or more) in a rendered
159  // scene
162  vtkPolygonalSurfacePointPlacerInternals *Internals;
165 
166 private:
168  void operator=(const vtkPolygonalSurfacePointPlacer&); //Not implemented
169 };
170 
171 #endif