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

vtkQuadraticPyramid.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQuadraticPyramid.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 =========================================================================*/
00041 #ifndef __vtkQuadraticPyramid_h
00042 #define __vtkQuadraticPyramid_h
00043 
00044 #include "vtkNonLinearCell.h"
00045 
00046 class vtkQuadraticEdge;
00047 class vtkQuadraticQuad;
00048 class vtkQuadraticTriangle;
00049 class vtkTetra;
00050 class vtkPyramid;
00051 
00052 class VTK_FILTERING_EXPORT vtkQuadraticPyramid : public vtkNonLinearCell
00053 {
00054 public:
00055   static vtkQuadraticPyramid *New();
00056   vtkTypeRevisionMacro(vtkQuadraticPyramid,vtkNonLinearCell);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00062   int GetCellType() {return VTK_QUADRATIC_PYRAMID;};
00063   int GetCellDimension() {return 3;}
00064   int GetNumberOfEdges() {return 8;}
00065   int GetNumberOfFaces() {return 5;}
00066   vtkCell *GetEdge(int edgeId);
00067   vtkCell *GetFace(int faceId);
00069 
00070   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00071   void Contour(double value, vtkDataArray *cellScalars, 
00072                vtkPointLocator *locator, vtkCellArray *verts, 
00073                vtkCellArray *lines, vtkCellArray *polys, 
00074                vtkPointData *inPd, vtkPointData *outPd,
00075                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00076   int EvaluatePosition(double x[3], double* closestPoint,
00077                        int& subId, double pcoords[3], 
00078                        double& dist2, double *weights);
00079   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00080                         double *weights);
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();
00085 
00087 
00090   void Clip(double value, vtkDataArray *cellScalars, 
00091             vtkPointLocator *locator, vtkCellArray *tets,
00092             vtkPointData *inPd, vtkPointData *outPd,
00093             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00094             int insideOut);
00096 
00098 
00100   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00101                         double x[3], double pcoords[3], int& subId);
00103 
00104   
00106   int GetParametricCenter(double pcoords[3]);
00107 
00109 
00110   static void InterpolationFunctions(double pcoords[3], double weights[13]);
00111   static void InterpolationDerivs(double pcoords[3], double derivs[39]);
00113 
00117   void JacobianInverse(double pcoords[3], double **inverse, double derivs[39]);
00118 
00119 protected:
00120   vtkQuadraticPyramid();
00121   ~vtkQuadraticPyramid();
00122 
00123   vtkQuadraticEdge *Edge;
00124   vtkQuadraticTriangle *TriangleFace;
00125   vtkQuadraticQuad *Face;
00126   vtkTetra         *Tetra;
00127   vtkPyramid       *Pyramid;
00128   vtkPointData     *PointData;
00129   vtkCellData      *CellData;
00130   vtkDoubleArray   *CellScalars;
00131   vtkDoubleArray   *Scalars; //used to avoid New/Delete in contouring/clipping
00132 
00133   void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId, vtkDataArray *cellScalars);
00134 
00135 private:
00136   vtkQuadraticPyramid(const vtkQuadraticPyramid&);  // Not implemented.
00137   void operator=(const vtkQuadraticPyramid&);  // Not implemented.
00138 };
00139 //----------------------------------------------------------------------------
00140 // Return the center of the quadratic pyramid in parametric coordinates.
00141 //
00142 inline int vtkQuadraticPyramid::GetParametricCenter(double pcoords[3])
00143 {
00144   pcoords[0] = pcoords[1] = 6./13;
00145   pcoords[2] = 3./13;
00146   return 0;
00147 }
00148 
00149 
00150 #endif

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