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

vtkPyramid.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPyramid.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 =========================================================================*/
00036 #ifndef __vtkPyramid_h
00037 #define __vtkPyramid_h
00038 
00039 #include "vtkCell3D.h"
00040 
00041 class vtkLine;
00042 class vtkQuad;
00043 class vtkTriangle;
00044 class vtkUnstructuredGrid;
00045 
00046 class VTK_FILTERING_EXPORT vtkPyramid : public vtkCell3D
00047 {
00048 public:
00049   static vtkPyramid *New();
00050   vtkTypeRevisionMacro(vtkPyramid,vtkCell3D);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00054 
00055   virtual void GetEdgePoints(int edgeId, int* &pts);
00056   virtual void GetFacePoints(int faceId, int* &pts);
00058 
00060 
00061   int GetCellType() {return VTK_PYRAMID;}
00062   int GetCellDimension() {return 3;}
00063   int GetNumberOfEdges() {return 8;}
00064   int GetNumberOfFaces() {return 5;}
00065   vtkCell *GetEdge(int edgeId);
00066   vtkCell *GetFace(int faceId);
00067   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00068   void Contour(double value, vtkDataArray *cellScalars, 
00069                vtkPointLocator *locator, vtkCellArray *verts, 
00070                vtkCellArray *lines, vtkCellArray *polys,
00071                vtkPointData *inPd, vtkPointData *outPd,
00072                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00073   int EvaluatePosition(double x[3], double* closestPoint,
00074                        int& subId, double pcoords[3],
00075                        double& dist2, double *weights);
00076   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00077                         double *weights);
00078   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00079                         double x[3], double pcoords[3], int& subId);
00080   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00081   void Derivatives(int subId, double pcoords[3], double *values, 
00082                    int dim, double *derivs);
00083   virtual double *GetParametricCoords();
00085 
00087   int GetParametricCenter(double pcoords[3]);
00088 
00090 
00092   static void InterpolationFunctions(double pcoords[3], double weights[5]);
00093   static void InterpolationDerivs(double pcoords[3], double derivs[15]);
00094   int JacobianInverse(double pcoords[3], double **inverse, double derivs[15]);
00095   static int *GetEdgeArray(int edgeId);
00096   static int *GetFaceArray(int faceId);
00098 
00099 protected:
00100   vtkPyramid();
00101   ~vtkPyramid();
00102 
00103   vtkLine *Line;
00104   vtkTriangle *Triangle;
00105   vtkQuad *Quad;
00106 
00107 private:
00108   vtkPyramid(const vtkPyramid&);  // Not implemented.
00109   void operator=(const vtkPyramid&);  // Not implemented.
00110 };
00111 
00112 //----------------------------------------------------------------------------
00113 inline int vtkPyramid::GetParametricCenter(double pcoords[3])
00114 {
00115   pcoords[0] = pcoords[1] = 0.4;
00116   pcoords[2] = 0.2;
00117   return 0;
00118 }
00119 
00120 #endif
00121 
00122 
00123 

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