00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00032 #ifndef __vtkConvexPointSet_h
00033 #define __vtkConvexPointSet_h
00034
00035 #include "vtkCell3D.h"
00036
00037 class vtkUnstructuredGrid;
00038 class vtkCellArray;
00039 class vtkTriangle;
00040 class vtkTetra;
00041 class vtkDoubleArray;
00042
00043 class VTK_FILTERING_EXPORT vtkConvexPointSet : public vtkCell3D
00044 {
00045 public:
00046 static vtkConvexPointSet *New();
00047 vtkTypeRevisionMacro(vtkConvexPointSet,vtkCell3D);
00048 void PrintSelf(ostream& os, vtkIndent indent);
00049
00051 virtual int HasFixedTopology() {return 0;}
00052
00054
00055 virtual void GetEdgePoints(int vtkNotUsed(edgeId), int* &vtkNotUsed(pts)) {}
00056 virtual void GetFacePoints(int vtkNotUsed(faceId), int* &vtkNotUsed(pts)) {}
00057 virtual double *GetParametricCoords();
00059
00061 virtual int GetCellType() {return VTK_CONVEX_POINT_SET;}
00062
00064
00065 virtual int RequiresInitialization() {return 1;}
00066 virtual void Initialize();
00068
00070
00079 virtual int GetNumberOfEdges() {return 0;}
00080 virtual vtkCell *GetEdge(int) {return NULL;}
00081 virtual int GetNumberOfFaces();
00082 virtual vtkCell *GetFace(int faceId);
00084
00086
00088 virtual void Contour(double value, vtkDataArray *cellScalars,
00089 vtkPointLocator *locator, vtkCellArray *verts,
00090 vtkCellArray *lines, vtkCellArray *polys,
00091 vtkPointData *inPd, vtkPointData *outPd,
00092 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00094
00096
00099 virtual void Clip(double value, vtkDataArray *cellScalars,
00100 vtkPointLocator *locator, vtkCellArray *connectivity,
00101 vtkPointData *inPd, vtkPointData *outPd,
00102 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00103 int insideOut);
00105
00107
00110 virtual int EvaluatePosition(double x[3], double* closestPoint,
00111 int& subId, double pcoords[3],
00112 double& dist2, double *weights);
00114
00116
00117 virtual void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00118 double *weights);
00120
00122
00124 virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00125 double x[3], double pcoords[3], int& subId);
00127
00129 virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00130
00132
00134 virtual void Derivatives(int subId, double pcoords[3], double *values,
00135 int dim, double *derivs);
00137
00141 virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00142
00144 virtual int GetParametricCenter(double pcoords[3]);
00145
00148 int IsPrimaryCell() {return 0;}
00149
00150 protected:
00151 vtkConvexPointSet();
00152 ~vtkConvexPointSet();
00153
00154 vtkTetra *Tetra;
00155 vtkIdList *TetraIds;
00156 vtkPoints *TetraPoints;
00157 vtkDoubleArray *TetraScalars;
00158
00159 vtkCellArray *BoundaryTris;
00160 vtkTriangle *Triangle;
00161 vtkDoubleArray *ParametricCoords;
00162
00163 private:
00164 vtkConvexPointSet(const vtkConvexPointSet&);
00165 void operator=(const vtkConvexPointSet&);
00166 };
00167
00168
00169 inline int vtkConvexPointSet::GetParametricCenter(double pcoords[3])
00170 {
00171 pcoords[0] = pcoords[1] = pcoords[2] = 0.5;
00172 return 0;
00173 }
00174
00175 #endif
00176
00177
00178