00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00029 #ifndef __vtkConvexPointSet_h
00030 #define __vtkConvexPointSet_h
00031
00032 #include "vtkCell3D.h"
00033
00034 class vtkUnstructuredGrid;
00035 class vtkCellArray;
00036 class vtkTriangle;
00037 class vtkTetra;
00038 class vtkDoubleArray;
00039
00040 class VTK_COMMON_EXPORT vtkConvexPointSet : public vtkCell3D
00041 {
00042 public:
00043 static vtkConvexPointSet *New();
00044 vtkTypeRevisionMacro(vtkConvexPointSet,vtkCell3D);
00045
00047 virtual int HasFixedTopology() {return 0;}
00048
00050
00051 virtual void GetEdgePoints(int vtkNotUsed(edgeId), int* &vtkNotUsed(pts)) {}
00052 virtual void GetFacePoints(int vtkNotUsed(faceId), int* &vtkNotUsed(pts)) {}
00053 virtual double *GetParametricCoords();
00055
00057 virtual int GetCellType() {return VTK_CONVEX_POINT_SET;}
00058
00060
00061 virtual int RequiresInitialization() {return 1;}
00062 virtual void Initialize();
00064
00066
00075 virtual int GetNumberOfEdges() {return 0;}
00076 virtual vtkCell *GetEdge(int) {return NULL;}
00077 virtual int GetNumberOfFaces();
00078 virtual vtkCell *GetFace(int faceId);
00080
00082
00084 virtual void Contour(double value, vtkDataArray *cellScalars,
00085 vtkPointLocator *locator, vtkCellArray *verts,
00086 vtkCellArray *lines, vtkCellArray *polys,
00087 vtkPointData *inPd, vtkPointData *outPd,
00088 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00090
00092
00095 virtual void Clip(double value, vtkDataArray *cellScalars,
00096 vtkPointLocator *locator, vtkCellArray *connectivity,
00097 vtkPointData *inPd, vtkPointData *outPd,
00098 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00099 int insideOut);
00101
00103
00106 virtual int EvaluatePosition(double x[3], double* closestPoint,
00107 int& subId, double pcoords[3],
00108 double& dist2, double *weights);
00110
00112
00113 virtual void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00114 double *weights);
00116
00118
00120 virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00121 double x[3], double pcoords[3], int& subId);
00123
00125 virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00126
00128
00130 virtual void Derivatives(int subId, double pcoords[3], double *values,
00131 int dim, double *derivs);
00133
00137 virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00138
00140 virtual int GetParametricCenter(double pcoords[3]);
00141
00144 int IsPrimaryCell() {return 0;}
00145
00146 protected:
00147 vtkConvexPointSet();
00148 ~vtkConvexPointSet();
00149
00150 vtkTetra *Tetra;
00151 vtkIdList *TetraIds;
00152 vtkPoints *TetraPoints;
00153 vtkDoubleArray *TetraScalars;
00154
00155 vtkCellArray *BoundaryTris;
00156 vtkTriangle *Triangle;
00157 vtkDoubleArray *ParametricCoords;
00158
00159 private:
00160 vtkConvexPointSet(const vtkConvexPointSet&);
00161 void operator=(const vtkConvexPointSet&);
00162 };
00163
00164 inline int vtkConvexPointSet::GetParametricCenter(double pcoords[3])
00165 {
00166 pcoords[0] = pcoords[1] = pcoords[2] = 0.5;
00167 return 0;
00168 }
00169
00170 #endif
00171
00172
00173