00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00031 #ifndef __vtkPolygonalSurfacePointPlacer_h
00032 #define __vtkPolygonalSurfacePointPlacer_h
00033
00034 #include "vtkPolyDataPointPlacer.h"
00035
00036 class vtkPolyDataCollection;
00037 class vtkCellPicker;
00038 class vtkPolygonalSurfacePointPlacerInternals;
00039 class vtkPolyData;
00040
00041
00042
00043
00044
00045 struct vtkPolygonalSurfacePointPlacerNode
00046 {
00047 double WorldPosition[3];
00048 double SurfaceWorldPosition[3];
00049 vtkIdType CellId;
00050 double ParametricCoords[3];
00051 vtkPolyData *PolyData;
00052 };
00053
00054
00055 class VTK_WIDGETS_EXPORT vtkPolygonalSurfacePointPlacer
00056 : public vtkPolyDataPointPlacer
00057 {
00058 public:
00060 static vtkPolygonalSurfacePointPlacer *New();
00061
00063
00064 vtkTypeMacro(vtkPolygonalSurfacePointPlacer,vtkPolyDataPointPlacer);
00065 void PrintSelf(ostream& os, vtkIndent indent);
00067
00068
00069
00070 virtual void AddProp( vtkProp * );
00071 virtual void RemoveViewProp(vtkProp *prop);
00072 virtual void RemoveAllProps();
00073
00075
00080 virtual int ComputeWorldPosition( vtkRenderer *ren,
00081 double displayPos[2],
00082 double worldPos[3],
00083 double worldOrient[9] );
00085
00087
00090 virtual int ComputeWorldPosition( vtkRenderer *ren,
00091 double displayPos[2],
00092 double refWorldPos[3],
00093 double worldPos[3],
00094 double worldOrient[9] );
00096
00099 virtual int ValidateWorldPosition( double worldPos[3] );
00100
00102 virtual int ValidateDisplayPosition( vtkRenderer *, double displayPos[2] );
00103
00105
00107 virtual int ValidateWorldPosition( double worldPos[3],
00108 double worldOrient[9] );
00110
00112
00113 vtkGetObjectMacro( CellPicker, vtkCellPicker );
00115
00117
00119 vtkGetObjectMacro( Polys, vtkPolyDataCollection );
00121
00123
00126 vtkSetMacro( DistanceOffset, double );
00127 vtkGetMacro( DistanceOffset, double );
00129
00131
00132 typedef vtkPolygonalSurfacePointPlacerNode Node;
00133 Node *GetNodeAtWorldPosition( double worldPos[3] );
00134
00136
00137 protected:
00138 vtkPolygonalSurfacePointPlacer();
00139 ~vtkPolygonalSurfacePointPlacer();
00140
00141
00142
00143 vtkCellPicker *CellPicker;
00144 vtkPolyDataCollection *Polys;
00145 vtkPolygonalSurfacePointPlacerInternals *Internals;
00146 double DistanceOffset;
00147
00148 private:
00149 vtkPolygonalSurfacePointPlacer(const vtkPolygonalSurfacePointPlacer&);
00150 void operator=(const vtkPolygonalSurfacePointPlacer&);
00151 };
00152
00153 #endif