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];
50  double ParametricCoords[3]; // parametric coords within cell
52 };
53 //ETX
54 
56  : public vtkPolyDataPointPlacer
57 {
58 public:
61 
63 
65  void PrintSelf(ostream& os, vtkIndent indent);
67 
68  // Descuription:
69  // Add /remove a prop, to place points on
70  virtual void AddProp( vtkProp * );
71  virtual void RemoveViewProp(vtkProp *prop);
72  virtual void RemoveAllProps();
73 
75 
80  virtual int ComputeWorldPosition( vtkRenderer *ren,
81  double displayPos[2],
82  double worldPos[3],
83  double worldOrient[9] );
85 
87 
90  virtual int ComputeWorldPosition( vtkRenderer *ren,
91  double displayPos[2],
92  double refWorldPos[3],
93  double worldPos[3],
94  double worldOrient[9] );
96 
99  virtual int ValidateWorldPosition( double worldPos[3] );
100 
102  virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] );
103 
105 
107  virtual int ValidateWorldPosition( double worldPos[3],
108  double worldOrient[9] );
110 
112 
113  vtkGetObjectMacro( CellPicker, vtkCellPicker );
115 
117 
119  vtkGetObjectMacro( Polys, vtkPolyDataCollection );
121 
123 
126  vtkSetMacro( DistanceOffset, double );
127  vtkGetMacro( DistanceOffset, double );
129 
130 //BTX
132 
134  Node *GetNodeAtWorldPosition( double worldPos[3] );
135 //ETX
137 
138 protected:
141 
142  // The props that represents the terrain data (one or more) in a rendered
143  // scene
146  vtkPolygonalSurfacePointPlacerInternals *Internals;
148 
149 private:
151  void operator=(const vtkPolygonalSurfacePointPlacer&); //Not implemented
152 };
153 
154 #endif