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

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 =========================================================================*/
00045 #ifndef __vtkQuadraticTetra_h
00046 #define __vtkQuadraticTetra_h
00047 
00048 #include "vtkNonLinearCell.h"
00049 
00050 class vtkPolyData;
00051 class vtkQuadraticEdge;
00052 class vtkQuadraticTriangle;
00053 class vtkTetra;
00054 class vtkDoubleArray;
00055 
00056 class VTK_FILTERING_EXPORT vtkQuadraticTetra : public vtkNonLinearCell
00057 {
00058 public:
00059   static vtkQuadraticTetra *New();
00060   vtkTypeRevisionMacro(vtkQuadraticTetra,vtkNonLinearCell);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00064 
00066   int GetCellType() {return VTK_QUADRATIC_TETRA;}
00067   int GetCellDimension() {return 3;}
00068   int GetNumberOfEdges() {return 6;}
00069   int GetNumberOfFaces() {return 4;}
00070   vtkCell *GetEdge(int);
00071   vtkCell *GetFace(int);
00073 
00074   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00075   void Contour(double value, vtkDataArray *cellScalars, 
00076                vtkPointLocator *locator, vtkCellArray *verts, 
00077                vtkCellArray *lines, vtkCellArray *polys, 
00078                vtkPointData *inPd, vtkPointData *outPd,
00079                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00080   int EvaluatePosition(double x[3], double* closestPoint,
00081                        int& subId, double pcoords[3], 
00082                        double& dist2, double *weights);
00083   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00084                         double *weights);
00085   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00086   void Derivatives(int subId, double pcoords[3], double *values, 
00087                    int dim, double *derivs);
00088   virtual double *GetParametricCoords();
00089 
00091 
00093   void Clip(double value, vtkDataArray *cellScalars, 
00094             vtkPointLocator *locator, vtkCellArray *tetras,
00095             vtkPointData *inPd, vtkPointData *outPd,
00096             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00097             int insideOut);
00099 
00101 
00103   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00104                         double x[3], double pcoords[3], int& subId);
00106 
00107   
00109   int GetParametricCenter(double pcoords[3]);
00110 
00113   double GetParametricDistance(double pcoords[3]);
00114 
00116 
00117   static void InterpolationFunctions(double pcoords[3], double weights[10]);
00118   static void InterpolationDerivs(double pcoords[3], double derivs[30]);
00120 
00124   void JacobianInverse(double pcoords[3], double **inverse, double derivs[30]);
00125 
00126 protected:
00127   vtkQuadraticTetra();
00128   ~vtkQuadraticTetra();
00129 
00130   vtkQuadraticEdge *Edge;
00131   vtkQuadraticTriangle *Face;
00132   vtkTetra *Tetra;
00133   vtkDoubleArray *Scalars; //used to avoid New/Delete in contouring/clipping
00134 
00135 private:
00136   vtkQuadraticTetra(const vtkQuadraticTetra&);  // Not implemented.
00137   void operator=(const vtkQuadraticTetra&);  // Not implemented.
00138 };
00139 
00140 #endif
00141 
00142