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

vtkPentagonalPrism.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPentagonalPrism.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 =========================================================================*/
00047 #ifndef __vtkPentagonalPrism_h
00048 #define __vtkPentagonalPrism_h
00049 
00050 #include "vtkCell3D.h"
00051 
00052 class vtkLine;
00053 class vtkPolygon;
00054 class vtkQuad;
00055 
00056 class VTK_FILTERING_EXPORT vtkPentagonalPrism : public vtkCell3D
00057 {
00058 public:
00059   static vtkPentagonalPrism *New();
00060   vtkTypeRevisionMacro(vtkPentagonalPrism,vtkCell3D);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00064 
00065   virtual void GetEdgePoints(int edgeId, int* &pts);
00066   virtual void GetFacePoints(int faceId, int* &pts);
00068 
00070 
00071   int GetCellType() {return VTK_PENTAGONAL_PRISM;};
00072   int GetCellDimension() {return 3;};
00073   int GetNumberOfEdges() {return 15;};
00074   int GetNumberOfFaces() {return 7;};
00075   vtkCell *GetEdge(int edgeId);
00076   vtkCell *GetFace(int faceId);
00077   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00079 
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 IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00086                         double x[3], double pcoords[3], int& subId);
00087   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00088   void Derivatives(int subId, double pcoords[3], double *values, 
00089                    int dim, double *derivs);
00090   double *GetParametricCoords();
00091 
00093   int GetParametricCenter(double pcoords[3]);
00094 
00096 
00097   static void InterpolationFunctions(double pcoords[3], double weights[10]);
00098   static void InterpolationDerivs(double pcoords[3], double derivs[30]);
00099   static int *GetEdgeArray(int edgeId);
00100   static int *GetFaceArray(int faceId);
00102 
00106   void JacobianInverse(double pcoords[3], double **inverse, double derivs[30]);
00107 
00108 protected:
00109   vtkPentagonalPrism();
00110   ~vtkPentagonalPrism();
00111 
00112   vtkLine          *Line;
00113   vtkQuad          *Quad;
00114   vtkPolygon       *Polygon;
00115 
00116 private:
00117   vtkPentagonalPrism(const vtkPentagonalPrism&);  // Not implemented.
00118   void operator=(const vtkPentagonalPrism&);  // Not implemented.
00119 };
00120 
00121 //----------------------------------------------------------------------------
00122 inline int vtkPentagonalPrism::GetParametricCenter(double pcoords[3])
00123 {
00124   pcoords[0] = pcoords[1] = 0.5;
00125   pcoords[2] = 0.5;
00126 
00127   return 0;
00128 }
00129 #endif
00130 
00131