00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00033 #ifndef __vtkConvexPointSet_h
00034 #define __vtkConvexPointSet_h
00035
00036 #include "vtkCell3D.h"
00037
00038 class vtkUnstructuredGrid;
00039 class vtkCellArray;
00040 class vtkTriangle;
00041 class vtkTetra;
00042 class vtkFloatArray;
00043
00044 class VTK_COMMON_EXPORT vtkConvexPointSet : public vtkCell3D
00045 {
00046 public:
00047 static vtkConvexPointSet *New();
00048 vtkTypeRevisionMacro(vtkConvexPointSet,vtkCell3D);
00049
00051
00052 virtual void GetEdgePoints(int vtkNotUsed(edgeId), int* &vtkNotUsed(pts)) {}
00053 virtual void GetFacePoints(int vtkNotUsed(faceId), int* &vtkNotUsed(pts)) {}
00054 virtual float *GetParametricCoords();
00056
00058 virtual int GetCellType() {return VTK_CONVEX_POINT_SET;}
00059
00061
00062 virtual int RequiresInitialization() {return 1;}
00063 virtual void Initialize();
00065
00067
00076 virtual int GetNumberOfEdges() {return 0;}
00077 virtual vtkCell *GetEdge(int) {return NULL;}
00078 virtual int GetNumberOfFaces();
00079 virtual vtkCell *GetFace(int faceId);
00081
00083
00085 virtual void Contour(float value, vtkDataArray *cellScalars,
00086 vtkPointLocator *locator, vtkCellArray *verts,
00087 vtkCellArray *lines, vtkCellArray *polys,
00088 vtkPointData *inPd, vtkPointData *outPd,
00089 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00091
00093
00096 virtual void Clip(float value, vtkDataArray *cellScalars,
00097 vtkPointLocator *locator, vtkCellArray *connectivity,
00098 vtkPointData *inPd, vtkPointData *outPd,
00099 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00100 int insideOut);
00102
00104
00107 virtual int EvaluatePosition(float x[3], float* closestPoint,
00108 int& subId, float pcoords[3],
00109 float& dist2, float *weights);
00111
00113
00114 virtual void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00115 float *weights);
00117
00119
00121 virtual int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00122 float x[3], float pcoords[3], int& subId);
00124
00126 virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00127
00129
00131 virtual void Derivatives(int subId, float pcoords[3], float *values,
00132 int dim, float *derivs);
00134
00138 virtual int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00139
00141 virtual int GetParametricCenter(float pcoords[3]);
00142
00143 protected:
00144 vtkConvexPointSet();
00145 ~vtkConvexPointSet();
00146
00147 vtkTetra *Tetra;
00148 vtkIdList *TetraIds;
00149 vtkPoints *TetraPoints;
00150 vtkFloatArray *TetraScalars;
00151
00152 vtkCellArray *BoundaryTris;
00153 vtkTriangle *Triangle;
00154 vtkFloatArray *ParametricCoords;
00155
00156 private:
00157 vtkConvexPointSet(const vtkConvexPointSet&);
00158 void operator=(const vtkConvexPointSet&);
00159 };
00160
00161 inline int vtkConvexPointSet::GetParametricCenter(float pcoords[3])
00162 {
00163 pcoords[0] = pcoords[1] = pcoords[2] = 0.5;
00164 return 0;
00165 }
00166
00167 #endif
00168
00169
00170