vtkHexagonalPrism.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00047 #ifndef __vtkHexagonalPrism_h
00048 #define __vtkHexagonalPrism_h
00049
00050 #include "vtkCell3D.h"
00051
00052 class vtkLine;
00053 class vtkPolygon;
00054 class vtkQuad;
00055
00056 class VTK_FILTERING_EXPORT vtkHexagonalPrism : public vtkCell3D
00057 {
00058 public:
00059 static vtkHexagonalPrism *New();
00060 vtkTypeRevisionMacro(vtkHexagonalPrism,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_HEXAGONAL_PRISM;};
00072 int GetCellDimension() {return 3;};
00073 int GetNumberOfEdges() {return 18;};
00074 int GetNumberOfFaces() {return 8;};
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[12]);
00098 static void InterpolationDerivs(double pcoords[3], double derivs[36]);
00099 static int *GetEdgeArray(int edgeId);
00100 static int *GetFaceArray(int faceId);
00102
00106 void JacobianInverse(double pcoords[3], double **inverse, double derivs[36]);
00107
00108 protected:
00109 vtkHexagonalPrism();
00110 ~vtkHexagonalPrism();
00111
00112 vtkLine *Line;
00113 vtkQuad *Quad;
00114 vtkPolygon *Polygon;
00115
00116 private:
00117 vtkHexagonalPrism(const vtkHexagonalPrism&);
00118 void operator=(const vtkHexagonalPrism&);
00119 };
00120
00121
00122 inline int vtkHexagonalPrism::GetParametricCenter(double pcoords[3])
00123 {
00124 pcoords[0] = pcoords[1] = 0.5;
00125 pcoords[2] = 0.5;
00126 return 0;
00127 }
00128 #endif
00129
00130