• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Filtering/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 class vtkDoubleArray;
00052 
00053 class VTK_FILTERING_EXPORT vtkQuadraticPyramid : public vtkNonLinearCell
00054 {
00055 public:
00056   static vtkQuadraticPyramid *New();
00057   vtkTypeRevisionMacro(vtkQuadraticPyramid,vtkNonLinearCell);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061 
00063   int GetCellType() {return VTK_QUADRATIC_PYRAMID;};
00064   int GetCellDimension() {return 3;}
00065   int GetNumberOfEdges() {return 8;}
00066   int GetNumberOfFaces() {return 5;}
00067   vtkCell *GetEdge(int edgeId);
00068   vtkCell *GetFace(int faceId);
00070 
00071   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00072   void Contour(double value, vtkDataArray *cellScalars,
00073                vtkPointLocator *locator, vtkCellArray *verts,
00074                vtkCellArray *lines, vtkCellArray *polys,
00075                vtkPointData *inPd, vtkPointData *outPd,
00076                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00077   int EvaluatePosition(double x[3], double* closestPoint,
00078                        int& subId, double pcoords[3],
00079                        double& dist2, double *weights);
00080   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00081                         double *weights);
00082   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00083   void Derivatives(int subId, double pcoords[3], double *values,
00084                    int dim, double *derivs);
00085   virtual double *GetParametricCoords();
00086 
00088 
00091   void Clip(double value, vtkDataArray *cellScalars,
00092             vtkPointLocator *locator, vtkCellArray *tets,
00093             vtkPointData *inPd, vtkPointData *outPd,
00094             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00095             int insideOut);
00097 
00099 
00101   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00102                         double x[3], double pcoords[3], int& subId);
00104 
00105 
00107   int GetParametricCenter(double pcoords[3]);
00108 
00110 
00112   static void InterpolationFunctions(double pcoords[3], double weights[13]);
00113   // Description:
00114   // @deprecated Replaced by vtkQuadraticPyramid::InterpolateDerivs as of VTK 5.2
00115   static void InterpolationDerivs(double pcoords[3], double derivs[39]);
00116   // Description:
00117   // Compute the interpolation functions/derivatives
00118   // (aka shape functions/derivatives)
00119   virtual void InterpolateFunctions(double pcoords[3], double weights[13])
00120     {
00121     vtkQuadraticPyramid::InterpolationFunctions(pcoords,weights);
00122     }
00123   virtual void InterpolateDerivs(double pcoords[3], double derivs[39])
00124     {
00125     vtkQuadraticPyramid::InterpolationDerivs(pcoords,derivs);
00126     }
00127   // Description:
00128   // Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
00129   // Ids are related to the cell, not to the dataset.
00130   static int *GetEdgeArray(int edgeId);
00131   static int *GetFaceArray(int faceId);
00133 
00137   void JacobianInverse(double pcoords[3], double **inverse, double derivs[39]);
00138 
00139 protected:
00140   vtkQuadraticPyramid();
00141   ~vtkQuadraticPyramid();
00142 
00143   vtkQuadraticEdge *Edge;
00144   vtkQuadraticTriangle *TriangleFace;
00145   vtkQuadraticQuad *Face;
00146   vtkTetra         *Tetra;
00147   vtkPyramid       *Pyramid;
00148   vtkPointData     *PointData;
00149   vtkCellData      *CellData;
00150   vtkDoubleArray   *CellScalars;
00151   vtkDoubleArray   *Scalars; //used to avoid New/Delete in contouring/clipping
00152 
00153   void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId,
00154     vtkDataArray *cellScalars);
00155 
00156 private:
00157   vtkQuadraticPyramid(const vtkQuadraticPyramid&);  // Not implemented.
00158   void operator=(const vtkQuadraticPyramid&);  // Not implemented.
00159 };
00160 //----------------------------------------------------------------------------
00161 // Return the center of the quadratic pyramid in parametric coordinates.
00162 //
00163 inline int vtkQuadraticPyramid::GetParametricCenter(double pcoords[3])
00164 {
00165   pcoords[0] = pcoords[1] = 6./13;
00166   pcoords[2] = 3./13;
00167   return 0;
00168 }
00169 
00170 
00171 #endif

Generated by  doxygen 1.7.1