00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00038 #ifndef __vtkQuadraticLinearQuad_h
00039 #define __vtkQuadraticLinearQuad_h
00040 
00041 #include "vtkNonLinearCell.h"
00042 
00043 class vtkQuadraticEdge;
00044 class vtkLine;
00045 class vtkQuad;
00046 class vtkDoubleArray;
00047 
00048 class VTK_FILTERING_EXPORT vtkQuadraticLinearQuad : public vtkNonLinearCell
00049 {
00050 public:
00051   static vtkQuadraticLinearQuad *New();
00052   vtkTypeMacro(vtkQuadraticLinearQuad, vtkNonLinearCell);
00053   void PrintSelf(ostream & os, vtkIndent indent);
00054 
00056 
00058   int GetCellType () { return VTK_QUADRATIC_LINEAR_QUAD; };
00059   int GetCellDimension () { return 2; }
00060   int GetNumberOfEdges () { return 4; }
00061   int GetNumberOfFaces () { return 0; }
00062   vtkCell *GetEdge (int);
00063   vtkCell *GetFace (int) { return 0; }
00065 
00066   int CellBoundary (int subId, double pcoords[3], vtkIdList * pts);
00067   void Contour (double value, vtkDataArray * cellScalars,
00068     vtkIncrementalPointLocator * locator, vtkCellArray * verts,
00069     vtkCellArray * lines, vtkCellArray * polys,
00070     vtkPointData * inPd, vtkPointData * outPd, vtkCellData * inCd,
00071     vtkIdType cellId, vtkCellData * outCd);
00072   int EvaluatePosition (double x[3], double *closestPoint,
00073     int &subId, double pcoords[3], 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, int dim,
00078     double *derivs);
00079   virtual double *GetParametricCoords ();
00080 
00082 
00084   void Clip (double value, vtkDataArray * cellScalars,
00085        vtkIncrementalPointLocator * locator, vtkCellArray * polys,
00086        vtkPointData * inPd, vtkPointData * outPd,
00087        vtkCellData * inCd, vtkIdType cellId, vtkCellData * outCd,
00088        int insideOut);
00090 
00092 
00094   int IntersectWithLine (double p1[3], double p2[3], double tol, double &t,
00095     double x[3], double pcoords[3], int &subId);
00097 
00099   int GetParametricCenter(double pcoords[3]);
00100 
00102 
00104   static void InterpolationFunctions (double pcoords[3], double weights[6]);
00105   
00106   
00107   static void InterpolationDerivs (double pcoords[3], double derivs[12]);
00108   
00109   
00110   
00111   virtual void InterpolateFunctions (double pcoords[3], double weights[6])
00112     {
00113     vtkQuadraticLinearQuad::InterpolationFunctions(pcoords,weights);
00114     }
00115   virtual void InterpolateDerivs (double pcoords[3], double derivs[12])
00116     {
00117     vtkQuadraticLinearQuad::InterpolationDerivs(pcoords,derivs);
00118     }
00119   
00120   
00121   
00122   static int *GetEdgeArray(int edgeId);
00124 
00125 protected:
00126   vtkQuadraticLinearQuad ();
00127   ~vtkQuadraticLinearQuad ();
00128 
00129   vtkQuadraticEdge *Edge;
00130   vtkLine *LinEdge;
00131   vtkQuad *Quad;
00132   vtkDoubleArray *Scalars;
00133 
00134 private:
00135   vtkQuadraticLinearQuad (const vtkQuadraticLinearQuad &);  
00136   void operator = (const vtkQuadraticLinearQuad &);  
00137 };
00138 
00139 inline int vtkQuadraticLinearQuad::GetParametricCenter(double pcoords[3])
00140 {
00141   pcoords[0] = pcoords[1] = 0.5;
00142   pcoords[2] = 0.;
00143   return 0;
00144 }
00145 
00146 #endif