00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00036 #ifndef __vtkQuadraticWedge_h
00037 #define __vtkQuadraticWedge_h
00038
00039 #include "vtkNonLinearCell.h"
00040
00041 class vtkQuadraticEdge;
00042 class vtkQuadraticQuad;
00043 class vtkQuadraticTriangle;
00044 class vtkWedge;
00045 class vtkDoubleArray;
00046
00047 class VTK_FILTERING_EXPORT vtkQuadraticWedge : public vtkNonLinearCell
00048 {
00049 public:
00050 static vtkQuadraticWedge *New();
00051 vtkTypeRevisionMacro(vtkQuadraticWedge,vtkNonLinearCell);
00052 void PrintSelf(ostream& os, vtkIndent indent);
00053
00055
00057 int GetCellType() {return VTK_QUADRATIC_WEDGE;}
00058 int GetCellDimension() {return 3;}
00059 int GetNumberOfEdges() {return 9;}
00060 int GetNumberOfFaces() {return 5;}
00061 vtkCell *GetEdge(int edgeId);
00062 vtkCell *GetFace(int faceId);
00064
00065 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00066 void Contour(double value, vtkDataArray *cellScalars,
00067 vtkPointLocator *locator, vtkCellArray *verts,
00068 vtkCellArray *lines, vtkCellArray *polys,
00069 vtkPointData *inPd, vtkPointData *outPd,
00070 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00071 int EvaluatePosition(double x[3], double* closestPoint,
00072 int& subId, double pcoords[3],
00073 double& dist2, double *weights);
00074 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00075 double *weights);
00076 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00077 void Derivatives(int subId, double pcoords[3], double *values,
00078 int dim, double *derivs);
00079 virtual double *GetParametricCoords();
00080
00082
00085 void Clip(double value, vtkDataArray *cellScalars,
00086 vtkPointLocator *locator, vtkCellArray *tetras,
00087 vtkPointData *inPd, vtkPointData *outPd,
00088 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00089 int insideOut);
00091
00093
00095 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00096 double x[3], double pcoords[3], int& subId);
00098
00099
00101 int GetParametricCenter(double pcoords[3]);
00102
00104
00105 static void InterpolationFunctions(double pcoords[3], double weights[15]);
00106 static void InterpolationDerivs(double pcoords[3], double derivs[45]);
00108
00112 void JacobianInverse(double pcoords[3], double **inverse, double derivs[45]);
00113
00114 protected:
00115 vtkQuadraticWedge();
00116 ~vtkQuadraticWedge();
00117
00118 vtkQuadraticEdge *Edge;
00119 vtkQuadraticTriangle *TriangleFace;
00120 vtkQuadraticQuad *Face;
00121 vtkWedge *Wedge;
00122 vtkPointData *PointData;
00123 vtkCellData *CellData;
00124 vtkDoubleArray *CellScalars;
00125 vtkDoubleArray *Scalars;
00126
00127 void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId, vtkDataArray *cellScalars);
00128
00129 private:
00130 vtkQuadraticWedge(const vtkQuadraticWedge&);
00131 void operator=(const vtkQuadraticWedge&);
00132 };
00133
00134
00135 inline int vtkQuadraticWedge::GetParametricCenter(double pcoords[3])
00136 {
00137 pcoords[0] = pcoords[1] = 1./3;
00138 pcoords[2] = 0.5;
00139 return 0;
00140 }
00141
00142
00143 #endif
00144
00145