00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00051 #ifndef __vtkQuadraticPyramid_h
00052 #define __vtkQuadraticPyramid_h
00053
00054 #include "vtkNonLinearCell.h"
00055
00056 class vtkPolyData;
00057 class vtkQuadraticEdge;
00058 class vtkQuadraticQuad;
00059 class vtkQuadraticTriangle;
00060 class vtkTetra;
00061 class vtkPyramid;
00062 class vtkDoubleArray;
00063
00064 class VTK_FILTERING_EXPORT vtkQuadraticPyramid : public vtkNonLinearCell
00065 {
00066 public:
00067 static vtkQuadraticPyramid *New();
00068 vtkTypeRevisionMacro(vtkQuadraticPyramid,vtkNonLinearCell);
00069 void PrintSelf(ostream& os, vtkIndent indent);
00070
00072
00074 int GetCellType() {return VTK_QUADRATIC_PYRAMID;};
00075 int GetCellDimension() {return 3;}
00076 int GetNumberOfEdges() {return 8;}
00077 int GetNumberOfFaces() {return 5;}
00078 vtkCell *GetEdge(int edgeId);
00079 vtkCell *GetFace(int faceId);
00081
00082 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00083 void Contour(double value, vtkDataArray *cellScalars,
00084 vtkPointLocator *locator, vtkCellArray *verts,
00085 vtkCellArray *lines, vtkCellArray *polys,
00086 vtkPointData *inPd, vtkPointData *outPd,
00087 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00088 int EvaluatePosition(double x[3], double* closestPoint,
00089 int& subId, double pcoords[3],
00090 double& dist2, double *weights);
00091 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00092 double *weights);
00093 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00094 void Derivatives(int subId, double pcoords[3], double *values,
00095 int dim, double *derivs);
00096 virtual double *GetParametricCoords();
00097
00099
00102 void Clip(double value, vtkDataArray *cellScalars,
00103 vtkPointLocator *locator, vtkCellArray *tets,
00104 vtkPointData *inPd, vtkPointData *outPd,
00105 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00106 int insideOut);
00108
00110
00112 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00113 double x[3], double pcoords[3], int& subId);
00115
00116
00118 int GetParametricCenter(double pcoords[3]);
00119
00121
00122 static void InterpolationFunctions(double pcoords[3], double weights[13]);
00123 static void InterpolationDerivs(double pcoords[3], double derivs[39]);
00125
00129 void JacobianInverse(double pcoords[3], double **inverse, double derivs[39]);
00130
00131 protected:
00132 vtkQuadraticPyramid();
00133 ~vtkQuadraticPyramid();
00134
00135 vtkQuadraticEdge *Edge;
00136 vtkQuadraticTriangle *TriangleFace;
00137 vtkQuadraticQuad *Face;
00138 vtkTetra *Tetra;
00139 vtkPyramid *Pyramid;
00140 vtkPointData *PointData;
00141 vtkCellData *CellData;
00142 vtkDoubleArray *Scalars;
00143
00144 void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId);
00145
00146 private:
00147 vtkQuadraticPyramid(const vtkQuadraticPyramid&);
00148 void operator=(const vtkQuadraticPyramid&);
00149 };
00150
00151 #endif