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