00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkClosedSurfacePointPlacer_h
00028 #define __vtkClosedSurfacePointPlacer_h
00029
00030 #include "vtkPointPlacer.h"
00031
00032 class vtkPlane;
00033 class vtkPlaneCollection;
00034 class vtkPlanes;
00035 class vtkRenderer;
00036
00037 class VTK_WIDGETS_EXPORT vtkClosedSurfacePointPlacer : public vtkPointPlacer
00038 {
00039 public:
00041 static vtkClosedSurfacePointPlacer *New();
00042
00044
00045 vtkTypeRevisionMacro(vtkClosedSurfacePointPlacer,vtkPointPlacer);
00046 void PrintSelf(ostream& os, vtkIndent indent);
00048
00050
00056 void AddBoundingPlane(vtkPlane *plane);
00057 void RemoveBoundingPlane(vtkPlane *plane);
00058 void RemoveAllBoundingPlanes();
00059 virtual void SetBoundingPlanes(vtkPlaneCollection*);
00060 vtkGetObjectMacro(BoundingPlanes,vtkPlaneCollection);
00061 void SetBoundingPlanes(vtkPlanes *planes);
00063
00065
00074 int ComputeWorldPosition( vtkRenderer *ren,
00075 double displayPos[2],
00076 double worldPos[3],
00077 double worldOrient[9] );
00079
00081
00089 int ComputeWorldPosition( vtkRenderer *ren,
00090 double displayPos[2],
00091 double refWorldPos[2],
00092 double worldPos[3],
00093 double worldOrient[9] );
00095
00098 int ValidateWorldPosition( double worldPos[3] );
00099
00100
00101
00102
00103 int ValidateWorldPosition( double worldPos[3],
00104 double worldOrient[9]);
00105
00106
00107
00108
00109 vtkSetClampMacro( MinimumDistance, double, 0.0, VTK_DOUBLE_MAX );
00110 vtkGetMacro( MinimumDistance, double );
00111
00112 protected:
00113 vtkClosedSurfacePointPlacer();
00114 ~vtkClosedSurfacePointPlacer();
00115
00116
00117
00118 vtkPlaneCollection *BoundingPlanes;
00119
00120
00121
00122
00123 static double GetDistanceFromObject( double pos[3],
00124 vtkPlaneCollection * pc,
00125 double closestPt[3]);
00126
00127 void BuildPlanes();
00128
00129 double MinimumDistance;
00130 vtkPlaneCollection * InnerBoundingPlanes;
00131
00132 private:
00133 vtkClosedSurfacePointPlacer(const vtkClosedSurfacePointPlacer&);
00134 void operator=(const vtkClosedSurfacePointPlacer&);
00135 };
00136
00137 #endif