00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkQuad_h
00028 #define __vtkQuad_h
00029
00030 #include "vtkCell.h"
00031
00032 class vtkLine;
00033 class vtkTriangle;
00034
00035 class VTK_FILTERING_EXPORT vtkQuad : public vtkCell
00036 {
00037 public:
00038 static vtkQuad *New();
00039 vtkTypeRevisionMacro(vtkQuad,vtkCell);
00040 void PrintSelf(ostream& os, vtkIndent indent);
00041
00043
00044 int GetCellType() {return VTK_QUAD;};
00045 int GetCellDimension() {return 2;};
00046 int GetNumberOfEdges() {return 4;};
00047 int GetNumberOfFaces() {return 0;};
00048 vtkCell *GetEdge(int edgeId);
00049 vtkCell *GetFace(int) {return 0;};
00050 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00051 void Contour(double value, vtkDataArray *cellScalars,
00052 vtkPointLocator *locator, vtkCellArray *verts,
00053 vtkCellArray *lines, vtkCellArray *polys,
00054 vtkPointData *inPd, vtkPointData *outPd,
00055 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00056 int EvaluatePosition(double x[3], double* closestPoint,
00057 int& subId, double pcoords[3],
00058 double& dist2, double *weights);
00059 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00060 double *weights);
00061 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00062 double x[3], double pcoords[3], int& subId);
00063 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00064 void Derivatives(int subId, double pcoords[3], double *values,
00065 int dim, double *derivs);
00066 virtual double *GetParametricCoords();
00068
00070 int GetParametricCenter(double pcoords[3]);
00071
00073
00075 void Clip(double value, vtkDataArray *cellScalars,
00076 vtkPointLocator *locator, vtkCellArray *polys,
00077 vtkPointData *inPd, vtkPointData *outPd,
00078 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00079 int insideOut);
00081
00083
00084 static void InterpolationFunctions(double pcoords[3], double sf[4]);
00085
00086
00087 static void InterpolationDerivs(double pcoords[3], double derivs[8]);
00088
00089
00090
00091 virtual void InterpolateFunctions(double pcoords[3], double sf[4])
00092 {
00093 vtkQuad::InterpolationFunctions(pcoords,sf);
00094 }
00095 virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
00096 {
00097 vtkQuad::InterpolationDerivs(pcoords,derivs);
00098 }
00100
00103 int *GetEdgeArray(int edgeId);
00104
00105 protected:
00106 vtkQuad();
00107 ~vtkQuad();
00108
00109 vtkLine *Line;
00110 vtkTriangle *Triangle;
00111
00112 private:
00113 vtkQuad(const vtkQuad&);
00114 void operator=(const vtkQuad&);
00115 };
00116
00117 inline int vtkQuad::GetParametricCenter(double pcoords[3])
00118 {
00119 pcoords[0] = pcoords[1] = 0.5;
00120 pcoords[2] = 0.0;
00121 return 0;
00122 }
00123
00124
00125 #endif
00126
00127