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