vtkHull.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00054 #ifndef __vtkHull_h
00055 #define __vtkHull_h
00056
00057 #include "vtkPolyDataToPolyDataFilter.h"
00058
00059 class vtkCellArray;
00060 class vtkPlanes;
00061 class vtkPoints;
00062 class vtkPolyData;
00063
00064 class VTK_GRAPHICS_EXPORT vtkHull : public vtkPolyDataToPolyDataFilter
00065 {
00066 public:
00067 static vtkHull *New();
00068 vtkTypeRevisionMacro(vtkHull,vtkPolyDataToPolyDataFilter);
00069 void PrintSelf(ostream& os, vtkIndent indent);
00070
00072 void RemoveAllPlanes( void );
00073
00075
00084 int AddPlane( double A, double B, double C );
00085 int AddPlane( double plane[3] );
00087
00089
00095 void SetPlane( int i, double A, double B, double C );
00096 void SetPlane( int i, double plane[3] );
00098
00100
00102 int AddPlane( double A, double B, double C, double D );
00103 int AddPlane( double plane[3], double D );
00104 void SetPlane( int i, double A, double B, double C, double D );
00105 void SetPlane( int i, double plane[3], double D );
00107
00110 void SetPlanes( vtkPlanes *planes );
00111
00113
00114 vtkGetMacro( NumberOfPlanes, int );
00116
00121 void AddCubeVertexPlanes();
00122
00127 void AddCubeEdgePlanes();
00128
00131 void AddCubeFacePlanes();
00132
00140 void AddRecursiveSpherePlanes( int level );
00141
00143
00151 void GenerateHull(vtkPolyData *pd, double *bounds);
00152 void GenerateHull(vtkPolyData *pd, double xmin, double xmax,
00153 double ymin, double ymax, double zmin, double zmax);
00155
00156 protected:
00157 vtkHull();
00158 ~vtkHull();
00159
00160
00161 double *Planes;
00162
00163
00164
00165
00166 int PlanesStorageSize;
00167
00168
00169 int NumberOfPlanes;
00170
00171
00172 void ComputePlaneDistances();
00173
00174
00175
00176 void ClipPolygonsFromPlanes( vtkPoints *points, vtkCellArray *polys,
00177 double *bounds );
00178
00179
00180
00181
00182 void CreateInitialPolygon( double *, int, double * );
00183
00184
00185 void Execute();
00186 private:
00187 vtkHull(const vtkHull&);
00188 void operator=(const vtkHull&);
00189 };
00190
00191 #endif