VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Common/DataModel/vtkQuadraticTetra.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkQuadraticTetra.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00039 #ifndef vtkQuadraticTetra_h
00040 #define vtkQuadraticTetra_h
00041 
00042 #include "vtkCommonDataModelModule.h" // For export macro
00043 #include "vtkNonLinearCell.h"
00044 
00045 class vtkQuadraticEdge;
00046 class vtkQuadraticTriangle;
00047 class vtkTetra;
00048 class vtkDoubleArray;
00049 
00050 class VTKCOMMONDATAMODEL_EXPORT vtkQuadraticTetra : public vtkNonLinearCell
00051 {
00052 public:
00053   static vtkQuadraticTetra *New();
00054   vtkTypeMacro(vtkQuadraticTetra,vtkNonLinearCell);
00055   void PrintSelf(ostream& os, vtkIndent indent);
00056 
00058 
00060   int GetCellType() {return VTK_QUADRATIC_TETRA;}
00061   int GetCellDimension() {return 3;}
00062   int GetNumberOfEdges() {return 6;}
00063   int GetNumberOfFaces() {return 4;}
00064   vtkCell *GetEdge(int);
00065   vtkCell *GetFace(int);
00067 
00068   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00069   void Contour(double value, vtkDataArray *cellScalars,
00070                vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00071                vtkCellArray *lines, vtkCellArray *polys,
00072                vtkPointData *inPd, vtkPointData *outPd,
00073                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00074   int EvaluatePosition(double x[3], double* closestPoint,
00075                        int& subId, double pcoords[3],
00076                        double& dist2, double *weights);
00077   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00078                         double *weights);
00079   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00080   void Derivatives(int subId, double pcoords[3], double *values,
00081                    int dim, double *derivs);
00082   virtual double *GetParametricCoords();
00083 
00085 
00087   void Clip(double value, vtkDataArray *cellScalars,
00088             vtkIncrementalPointLocator *locator, vtkCellArray *tetras,
00089             vtkPointData *inPd, vtkPointData *outPd,
00090             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00091             int insideOut);
00093 
00095 
00097   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00098                         double x[3], double pcoords[3], int& subId);
00100 
00101 
00103   int GetParametricCenter(double pcoords[3]);
00104 
00107   double GetParametricDistance(double pcoords[3]);
00108 
00111   static void InterpolationFunctions(double pcoords[3], double weights[10]);
00114   static void InterpolationDerivs(double pcoords[3], double derivs[30]);
00116 
00118   virtual void InterpolateFunctions(double pcoords[3], double weights[10])
00119     {
00120     vtkQuadraticTetra::InterpolationFunctions(pcoords,weights);
00121     }
00122   virtual void InterpolateDerivs(double pcoords[3], double derivs[30])
00123     {
00124     vtkQuadraticTetra::InterpolationDerivs(pcoords,derivs);
00125     }
00127 
00128 
00130   static int *GetEdgeArray(int edgeId);
00131   static int *GetFaceArray(int faceId);
00133 
00137   void JacobianInverse(double pcoords[3], double **inverse, double derivs[30]);
00138 
00139 protected:
00140   vtkQuadraticTetra();
00141   ~vtkQuadraticTetra();
00142 
00143   vtkQuadraticEdge *Edge;
00144   vtkQuadraticTriangle *Face;
00145   vtkTetra *Tetra;
00146   vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
00147 
00148 private:
00149   vtkQuadraticTetra(const vtkQuadraticTetra&);  // Not implemented.
00150   void operator=(const vtkQuadraticTetra&);  // Not implemented.
00151 };
00152 
00153 #endif
00154 
00155