00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00035 #ifndef __vtkQuadraticTetra_h
00036 #define __vtkQuadraticTetra_h
00037 
00038 #include "vtkNonLinearCell.h"
00039 
00040 class vtkQuadraticEdge;
00041 class vtkQuadraticTriangle;
00042 class vtkTetra;
00043 class vtkDoubleArray;
00044 
00045 class VTK_FILTERING_EXPORT vtkQuadraticTetra : public vtkNonLinearCell
00046 {
00047 public:
00048   static vtkQuadraticTetra *New();
00049   vtkTypeMacro(vtkQuadraticTetra,vtkNonLinearCell);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053 
00055   int GetCellType() {return VTK_QUADRATIC_TETRA;}
00056   int GetCellDimension() {return 3;}
00057   int GetNumberOfEdges() {return 6;}
00058   int GetNumberOfFaces() {return 4;}
00059   vtkCell *GetEdge(int);
00060   vtkCell *GetFace(int);
00062 
00063   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00064   void Contour(double value, vtkDataArray *cellScalars,
00065                vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00066                vtkCellArray *lines, vtkCellArray *polys,
00067                vtkPointData *inPd, vtkPointData *outPd,
00068                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00069   int EvaluatePosition(double x[3], double* closestPoint,
00070                        int& subId, double pcoords[3],
00071                        double& dist2, double *weights);
00072   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00073                         double *weights);
00074   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00075   void Derivatives(int subId, double pcoords[3], double *values,
00076                    int dim, double *derivs);
00077   virtual double *GetParametricCoords();
00078 
00080 
00082   void Clip(double value, vtkDataArray *cellScalars,
00083             vtkIncrementalPointLocator *locator, vtkCellArray *tetras,
00084             vtkPointData *inPd, vtkPointData *outPd,
00085             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00086             int insideOut);
00088 
00090 
00092   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00093                         double x[3], double pcoords[3], int& subId);
00095 
00096 
00098   int GetParametricCenter(double pcoords[3]);
00099 
00102   double GetParametricDistance(double pcoords[3]);
00103 
00105 
00107   static void InterpolationFunctions(double pcoords[3], double weights[10]);
00108   
00109   
00110   static void InterpolationDerivs(double pcoords[3], double derivs[30]);
00111   
00112   
00113   
00114   virtual void InterpolateFunctions(double pcoords[3], double weights[10])
00115     {
00116     vtkQuadraticTetra::InterpolationFunctions(pcoords,weights);
00117     }
00118   virtual void InterpolateDerivs(double pcoords[3], double derivs[30])
00119     {
00120     vtkQuadraticTetra::InterpolationDerivs(pcoords,derivs);
00121     }
00122   
00123   
00124   
00125   static int *GetEdgeArray(int edgeId);
00126   static int *GetFaceArray(int faceId);
00128 
00132   void JacobianInverse(double pcoords[3], double **inverse, double derivs[30]);
00133 
00134 protected:
00135   vtkQuadraticTetra();
00136   ~vtkQuadraticTetra();
00137 
00138   vtkQuadraticEdge *Edge;
00139   vtkQuadraticTriangle *Face;
00140   vtkTetra *Tetra;
00141   vtkDoubleArray *Scalars; 
00142 
00143 private:
00144   vtkQuadraticTetra(const vtkQuadraticTetra&);  
00145   void operator=(const vtkQuadraticTetra&);  
00146 };
00147 
00148 #endif
00149 
00150