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 class vtkIncrementalPointLocator;
00035
00036 class VTK_FILTERING_EXPORT vtkQuad : public vtkCell
00037 {
00038 public:
00039 static vtkQuad *New();
00040 vtkTypeRevisionMacro(vtkQuad,vtkCell);
00041 void PrintSelf(ostream& os, vtkIndent indent);
00042
00044
00045 int GetCellType() {return VTK_QUAD;};
00046 int GetCellDimension() {return 2;};
00047 int GetNumberOfEdges() {return 4;};
00048 int GetNumberOfFaces() {return 0;};
00049 vtkCell *GetEdge(int edgeId);
00050 vtkCell *GetFace(int) {return 0;};
00051 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00052 void Contour(double value, vtkDataArray *cellScalars,
00053 vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00054 vtkCellArray *lines, vtkCellArray *polys,
00055 vtkPointData *inPd, vtkPointData *outPd,
00056 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00057 int EvaluatePosition(double x[3], double* closestPoint,
00058 int& subId, double pcoords[3],
00059 double& dist2, double *weights);
00060 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00061 double *weights);
00062 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00063 double x[3], double pcoords[3], int& subId);
00064 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00065 void Derivatives(int subId, double pcoords[3], double *values,
00066 int dim, double *derivs);
00067 virtual double *GetParametricCoords();
00069
00071 int GetParametricCenter(double pcoords[3]);
00072
00074
00076 void Clip(double value, vtkDataArray *cellScalars,
00077 vtkIncrementalPointLocator *locator, vtkCellArray *polys,
00078 vtkPointData *inPd, vtkPointData *outPd,
00079 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00080 int insideOut);
00082
00084
00085 static void InterpolationFunctions(double pcoords[3], double sf[4]);
00086
00087
00088 static void InterpolationDerivs(double pcoords[3], double derivs[8]);
00089
00090
00091
00092 virtual void InterpolateFunctions(double pcoords[3], double sf[4])
00093 {
00094 vtkQuad::InterpolationFunctions(pcoords,sf);
00095 }
00096 virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
00097 {
00098 vtkQuad::InterpolationDerivs(pcoords,derivs);
00099 }
00101
00104 int *GetEdgeArray(int edgeId);
00105
00106 protected:
00107 vtkQuad();
00108 ~vtkQuad();
00109
00110 vtkLine *Line;
00111 vtkTriangle *Triangle;
00112
00113 private:
00114 vtkQuad(const vtkQuad&);
00115 void operator=(const vtkQuad&);
00116 };
00117
00118 inline int vtkQuad::GetParametricCenter(double pcoords[3])
00119 {
00120 pcoords[0] = pcoords[1] = 0.5;
00121 pcoords[2] = 0.0;
00122 return 0;
00123 }
00124
00125
00126 #endif
00127
00128