00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00041 #ifndef __vtkQuadraticLinearWedge_h
00042 #define __vtkQuadraticLinearWedge_h
00043 
00044 #include "vtkNonLinearCell.h"
00045 
00046 class vtkQuadraticEdge;
00047 class vtkLine;
00048 class vtkQuadraticLinearQuad;
00049 class vtkQuadraticTriangle;
00050 class vtkWedge;
00051 class vtkDoubleArray;
00052 
00053 class VTK_FILTERING_EXPORT vtkQuadraticLinearWedge : public vtkNonLinearCell
00054 {
00055 public:
00056   static vtkQuadraticLinearWedge *New ();
00057   vtkTypeRevisionMacro (vtkQuadraticLinearWedge, vtkNonLinearCell);
00058   void PrintSelf (ostream & os, vtkIndent indent);
00059 
00061 
00063   int GetCellType () { return VTK_QUADRATIC_LINEAR_WEDGE; }
00064   int GetCellDimension () { return 3; }
00065   int GetNumberOfEdges () { return 9; }
00066   int GetNumberOfFaces () { return 5; }
00067   vtkCell *GetEdge (int edgeId);
00068   vtkCell *GetFace (int faceId);
00070 
00071   int CellBoundary (int subId, double pcoords[3], vtkIdList * pts);
00072 
00074 
00076   void Contour (double value, vtkDataArray * cellScalars,
00077     vtkPointLocator * locator, vtkCellArray * verts,
00078     vtkCellArray * lines, vtkCellArray * polys,
00079     vtkPointData * inPd, vtkPointData * outPd, vtkCellData * inCd,
00080     vtkIdType cellId, vtkCellData * outCd);
00081   int EvaluatePosition (double x[3], double *closestPoint,
00082     int &subId, double pcoords[3], double &dist2, double *weights);
00083   void EvaluateLocation (int &subId, double pcoords[3], double x[3], double *weights);
00084   int Triangulate (int index, vtkIdList * ptIds, vtkPoints * pts);
00085   void Derivatives (int subId, double pcoords[3], double *values, int dim, double *derivs);
00086   virtual double *GetParametricCoords ();
00088 
00090 
00093   void Clip (double value, vtkDataArray * cellScalars,
00094        vtkPointLocator * locator, vtkCellArray * tetras,
00095        vtkPointData * inPd, vtkPointData * outPd,
00096        vtkCellData * inCd, vtkIdType cellId, vtkCellData * outCd, int insideOut);
00098 
00100 
00102   int IntersectWithLine (double p1[3], double p2[3], double tol, double &t,
00103     double x[3], double pcoords[3], int &subId);
00105 
00108   int GetParametricCenter (double pcoords[3]);
00109 
00111 
00113   static void InterpolationFunctions (double pcoords[3], double weights[15]);
00114   
00115   
00116   static void InterpolationDerivs (double pcoords[3], double derivs[45]);
00117   
00118   
00119   
00120   virtual void InterpolateFunctions (double pcoords[3], double weights[15])
00121     {
00122     vtkQuadraticLinearWedge::InterpolationFunctions(pcoords,weights);
00123     }
00124   virtual void InterpolateDerivs (double pcoords[3], double derivs[45])
00125     {
00126     vtkQuadraticLinearWedge::InterpolationDerivs(pcoords,derivs);
00127     }
00128   
00129   
00130   
00131   static int *GetEdgeArray(int edgeId);
00132   static int *GetFaceArray(int faceId);
00134 
00138   void JacobianInverse (double pcoords[3], double **inverse, double derivs[45]);
00139 
00140 protected:
00141   vtkQuadraticLinearWedge ();
00142   ~vtkQuadraticLinearWedge ();
00143 
00144   vtkQuadraticEdge *QuadEdge;
00145   vtkLine *Edge;
00146   vtkQuadraticTriangle *TriangleFace;
00147   vtkQuadraticLinearQuad *Face;
00148   vtkWedge *Wedge;
00149   vtkDoubleArray *Scalars;  
00150 
00151 private:
00152   vtkQuadraticLinearWedge (const vtkQuadraticLinearWedge &);  
00153   void operator = (const vtkQuadraticLinearWedge &);  
00154 };
00155 
00156 
00157 inline int vtkQuadraticLinearWedge::GetParametricCenter(double pcoords[3])
00158 {
00159   pcoords[0] = pcoords[1] = 1./3;
00160   pcoords[2] = 0.5;
00161   return 0;
00162 }
00163 
00164 
00165 #endif