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

vtkTetra.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkTetra.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 __vtkTetra_h
00036 #define __vtkTetra_h
00037 
00038 #include "vtkCell3D.h"
00039 
00040 class vtkLine;
00041 class vtkTriangle;
00042 class vtkUnstructuredGrid;
00043 
00044 class VTK_FILTERING_EXPORT vtkTetra : public vtkCell3D
00045 {
00046 public:
00047   static vtkTetra *New();
00048   vtkTypeRevisionMacro(vtkTetra,vtkCell3D);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00052 
00053   virtual void GetEdgePoints(int edgeId, int* &pts);
00054   virtual void GetFacePoints(int faceId, int* &pts);
00056 
00058 
00059   int GetCellType() {return VTK_TETRA;}
00060   int GetNumberOfEdges() {return 6;}
00061   int GetNumberOfFaces() {return 4;}
00062   vtkCell *GetEdge(int edgeId);
00063   vtkCell *GetFace(int faceId);
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   void Clip(double value, vtkDataArray *cellScalars, 
00070             vtkPointLocator *locator, vtkCellArray *connectivity,
00071             vtkPointData *inPd, vtkPointData *outPd,
00072             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, 
00073             int insideOut);
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 IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00080                         double x[3], double pcoords[3], int& subId);
00081   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00082   void Derivatives(int subId, double pcoords[3], double *values, 
00083                    int dim, double *derivs);
00084   virtual double *GetParametricCoords();
00086 
00090   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00091   
00093   int GetParametricCenter(double pcoords[3]);
00094 
00097   double GetParametricDistance(double pcoords[3]);
00098 
00100 
00101   static void TetraCenter(double p1[3], double p2[3], double p3[3], double p4[3], 
00102                           double center[3]);
00104 
00106 
00109   static double Circumsphere(double  p1[3], double p2[3], double p3[3], 
00110                              double p4[3], double center[3]);
00112 
00114 
00117   static double Insphere(double  p1[3], double p2[3], double p3[3], 
00118                          double p4[3], double center[3]);
00120 
00122 
00133   static int BarycentricCoords(double x[3], double  x1[3], double x2[3], 
00134                                double x3[3], double x4[3], double bcoords[4]);
00136   
00138 
00140   static double ComputeVolume(double  p1[3], double p2[3], double p3[3], 
00141                               double p4[3]);
00143 
00147   int JacobianInverse(double **inverse, double derivs[12]);
00148 
00150 
00151   static void InterpolationFunctions(double pcoords[3], double weights[4]);
00152   static void InterpolationDerivs(double derivs[12]);
00153   static int *GetEdgeArray(int edgeId);
00154   static int *GetFaceArray(int faceId);
00156 
00157 protected:
00158   vtkTetra();
00159   ~vtkTetra();
00160 
00161   vtkLine *Line;
00162   vtkTriangle *Triangle;
00163 
00164 private:
00165   vtkTetra(const vtkTetra&);  // Not implemented.
00166   void operator=(const vtkTetra&);  // Not implemented.
00167 };
00168 
00169 inline int vtkTetra::GetParametricCenter(double pcoords[3])
00170 {
00171   pcoords[0] = pcoords[1] = pcoords[2] = 0.25;
00172   return 0;
00173 }
00174 
00175 #endif
00176 
00177 
00178 

Generated on Mon Jan 21 23:07:21 2008 for VTK by  doxygen 1.4.3-20050530