00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00044 #ifndef __vtkConvexPointSet_h
00045 #define __vtkConvexPointSet_h
00046
00047 #include "vtkCell3D.h"
00048
00049 class vtkUnstructuredGrid;
00050 class vtkCellArray;
00051 class vtkTriangle;
00052 class vtkTetra;
00053 class vtkFloatArray;
00054
00055 class VTK_COMMON_EXPORT vtkConvexPointSet : public vtkCell3D
00056 {
00057 public:
00058 static vtkConvexPointSet *New();
00059 vtkTypeRevisionMacro(vtkConvexPointSet,vtkCell3D);
00060
00062
00063 virtual void GetEdgePoints(int vtkNotUsed(edgeId), int* &vtkNotUsed(pts)) {}
00064 virtual void GetFacePoints(int vtkNotUsed(faceId), int* &vtkNotUsed(pts)) {}
00065 virtual float *GetParametricCoords();
00067
00069 virtual int GetCellType() {return VTK_CONVEX_POINT_SET;}
00070
00072
00073 virtual int RequiresInitialization() {return 1;}
00074 virtual void Initialize();
00076
00078
00087 virtual int GetNumberOfEdges() {return 0;}
00088 virtual vtkCell *GetEdge(int) {return NULL;}
00089 virtual int GetNumberOfFaces();
00090 virtual vtkCell *GetFace(int faceId);
00092
00094
00096 virtual void Contour(float value, vtkDataArray *cellScalars,
00097 vtkPointLocator *locator, vtkCellArray *verts,
00098 vtkCellArray *lines, vtkCellArray *polys,
00099 vtkPointData *inPd, vtkPointData *outPd,
00100 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00102
00104
00107 virtual void Clip(float value, vtkDataArray *cellScalars,
00108 vtkPointLocator *locator, vtkCellArray *connectivity,
00109 vtkPointData *inPd, vtkPointData *outPd,
00110 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00111 int insideOut);
00113
00115
00118 virtual int EvaluatePosition(float x[3], float* closestPoint,
00119 int& subId, float pcoords[3],
00120 float& dist2, float *weights);
00122
00124
00125 virtual void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00126 float *weights);
00128
00130
00132 virtual int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00133 float x[3], float pcoords[3], int& subId);
00135
00137 virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00138
00140
00142 virtual void Derivatives(int subId, float pcoords[3], float *values,
00143 int dim, float *derivs);
00145
00149 virtual int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00150
00152 virtual int GetParametricCenter(float pcoords[3]);
00153
00154 protected:
00155 vtkConvexPointSet();
00156 ~vtkConvexPointSet();
00157
00158 vtkTetra *Tetra;
00159 vtkIdList *TetraIds;
00160 vtkPoints *TetraPoints;
00161 vtkFloatArray *TetraScalars;
00162
00163 vtkCellArray *BoundaryTris;
00164 vtkTriangle *Triangle;
00165 vtkFloatArray *ParametricCoords;
00166
00167 private:
00168 vtkConvexPointSet(const vtkConvexPointSet&);
00169 void operator=(const vtkConvexPointSet&);
00170 };
00171
00172 inline int vtkConvexPointSet::GetParametricCenter(float pcoords[3])
00173 {
00174 pcoords[0] = pcoords[1] = pcoords[2] = 0.5;
00175 return 0;
00176 }
00177
00178 #endif
00179
00180
00181