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