00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00037 #ifndef __vtkPentagonalPrism_h
00038 #define __vtkPentagonalPrism_h
00039
00040 #include "vtkCell3D.h"
00041
00042 class vtkLine;
00043 class vtkPolygon;
00044 class vtkQuad;
00045
00046 class VTK_FILTERING_EXPORT vtkPentagonalPrism : public vtkCell3D
00047 {
00048 public:
00049 static vtkPentagonalPrism *New();
00050 vtkTypeRevisionMacro(vtkPentagonalPrism,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_PENTAGONAL_PRISM;};
00062 int GetCellDimension() {return 3;};
00063 int GetNumberOfEdges() {return 15;};
00064 int GetNumberOfFaces() {return 7;};
00065 vtkCell *GetEdge(int edgeId);
00066 vtkCell *GetFace(int faceId);
00067 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00069
00070 int EvaluatePosition(double x[3], double* closestPoint,
00071 int& subId, double pcoords[3],
00072 double& dist2, double *weights);
00073 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00074 double *weights);
00075 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00076 double x[3], double pcoords[3], int& subId);
00077 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00078 void Derivatives(int subId, double pcoords[3], double *values,
00079 int dim, double *derivs);
00080 double *GetParametricCoords();
00081
00083 int GetParametricCenter(double pcoords[3]);
00084
00086
00087 static void InterpolationFunctions(double pcoords[3], double weights[10]);
00088 static void InterpolationDerivs(double pcoords[3], double derivs[30]);
00089 static int *GetEdgeArray(int edgeId);
00090 static int *GetFaceArray(int faceId);
00092
00096 void JacobianInverse(double pcoords[3], double **inverse, double derivs[30]);
00097
00098 protected:
00099 vtkPentagonalPrism();
00100 ~vtkPentagonalPrism();
00101
00102 vtkLine *Line;
00103 vtkQuad *Quad;
00104 vtkPolygon *Polygon;
00105
00106 private:
00107 vtkPentagonalPrism(const vtkPentagonalPrism&);
00108 void operator=(const vtkPentagonalPrism&);
00109 };
00110
00111
00112 inline int vtkPentagonalPrism::GetParametricCenter(double pcoords[3])
00113 {
00114 pcoords[0] = pcoords[1] = 0.5;
00115 pcoords[2] = 0.5;
00116
00117 return 0;
00118 }
00119 #endif
00120
00121