00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00035 #ifndef __vtkQuadraticQuad_h
00036 #define __vtkQuadraticQuad_h
00037
00038 #include "vtkNonLinearCell.h"
00039
00040 class vtkQuadraticEdge;
00041 class vtkQuad;
00042 class vtkDoubleArray;
00043
00044 class VTK_FILTERING_EXPORT vtkQuadraticQuad : public vtkNonLinearCell
00045 {
00046 public:
00047 static vtkQuadraticQuad *New();
00048 vtkTypeMacro(vtkQuadraticQuad,vtkNonLinearCell);
00049 void PrintSelf(ostream& os, vtkIndent indent);
00050
00052
00054 int GetCellType() {return VTK_QUADRATIC_QUAD;};
00055 int GetCellDimension() {return 2;}
00056 int GetNumberOfEdges() {return 4;}
00057 int GetNumberOfFaces() {return 0;}
00058 vtkCell *GetEdge(int);
00059 vtkCell *GetFace(int) {return 0;}
00061
00062 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00063 void Contour(double value, vtkDataArray *cellScalars,
00064 vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00065 vtkCellArray *lines, vtkCellArray *polys,
00066 vtkPointData *inPd, vtkPointData *outPd,
00067 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00068 int EvaluatePosition(double x[3], double* closestPoint,
00069 int& subId, double pcoords[3],
00070 double& dist2, double *weights);
00071 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00072 double *weights);
00073 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00074 void Derivatives(int subId, double pcoords[3], double *values,
00075 int dim, double *derivs);
00076 virtual double *GetParametricCoords();
00077
00079
00081 void Clip(double value, vtkDataArray *cellScalars,
00082 vtkIncrementalPointLocator *locator, vtkCellArray *polys,
00083 vtkPointData *inPd, vtkPointData *outPd,
00084 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00085 int insideOut);
00087
00089
00091 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00092 double x[3], double pcoords[3], int& subId);
00094
00095
00097 int GetParametricCenter(double pcoords[3]);
00098
00100
00102 static void InterpolationFunctions(double pcoords[3], double weights[8]);
00103
00104
00105 static void InterpolationDerivs(double pcoords[3], double derivs[16]);
00106
00107
00108
00109 virtual void InterpolateFunctions(double pcoords[3], double weights[8])
00110 {
00111 vtkQuadraticQuad::InterpolationFunctions(pcoords,weights);
00112 }
00113 virtual void InterpolateDerivs(double pcoords[3], double derivs[16])
00114 {
00115 vtkQuadraticQuad::InterpolationDerivs(pcoords,derivs);
00116 }
00118
00119 protected:
00120 vtkQuadraticQuad();
00121 ~vtkQuadraticQuad();
00122
00123 vtkQuadraticEdge *Edge;
00124 vtkQuad *Quad;
00125 vtkPointData *PointData;
00126 vtkDoubleArray *Scalars;
00127
00128
00129
00130
00131 vtkCellData *CellData;
00132 vtkDoubleArray *CellScalars;
00133 void Subdivide(double *weights);
00134 void InterpolateAttributes(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId,
00135 vtkDataArray *cellScalars);
00136
00137 private:
00138 vtkQuadraticQuad(const vtkQuadraticQuad&);
00139 void operator=(const vtkQuadraticQuad&);
00140 };
00141
00142 inline int vtkQuadraticQuad::GetParametricCenter(double pcoords[3])
00143 {
00144 pcoords[0] = pcoords[1] = 0.5;
00145 pcoords[2] = 0.;
00146 return 0;
00147 }
00148
00149 #endif
00150
00151