Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Common/vtkQuadraticTetra.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQuadraticTetra.h,v $
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 =========================================================================*/
00035 #ifndef __vtkQuadraticTetra_h
00036 #define __vtkQuadraticTetra_h
00037 
00038 #include "vtkNonLinearCell.h"
00039 
00040 class vtkPolyData;
00041 class vtkQuadraticEdge;
00042 class vtkQuadraticTriangle;
00043 class vtkTetra;
00044 class vtkDoubleArray;
00045 
00046 class VTK_COMMON_EXPORT vtkQuadraticTetra : public vtkNonLinearCell
00047 {
00048 public:
00049   static vtkQuadraticTetra *New();
00050   vtkTypeRevisionMacro(vtkQuadraticTetra,vtkNonLinearCell);
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                vtkPointLocator *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             vtkPointLocator *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 
00106   static void InterpolationFunctions(double pcoords[3], double weights[10]);
00107   static void InterpolationDerivs(double pcoords[3], double derivs[30]);
00109 
00113   void JacobianInverse(double pcoords[3], double **inverse, double derivs[30]);
00114 
00115 protected:
00116   vtkQuadraticTetra();
00117   ~vtkQuadraticTetra();
00118 
00119   vtkQuadraticEdge *Edge;
00120   vtkQuadraticTriangle *Face;
00121   vtkTetra *Tetra;
00122   vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
00123 
00124 private:
00125   vtkQuadraticTetra(const vtkQuadraticTetra&);  // Not implemented.
00126   void operator=(const vtkQuadraticTetra&);  // Not implemented.
00127 };
00128 
00129 #endif
00130 
00131