00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00036 #ifndef __vtkQuadraticHexahedron_h
00037 #define __vtkQuadraticHexahedron_h
00038
00039 #include "vtkNonLinearCell.h"
00040
00041 class vtkQuadraticEdge;
00042 class vtkQuadraticQuad;
00043 class vtkHexahedron;
00044 class vtkDoubleArray;
00045
00046 class VTK_FILTERING_EXPORT vtkQuadraticHexahedron : public vtkNonLinearCell
00047 {
00048 public:
00049 static vtkQuadraticHexahedron *New();
00050 vtkTypeMacro(vtkQuadraticHexahedron,vtkNonLinearCell);
00051 void PrintSelf(ostream& os, vtkIndent indent);
00052
00054
00056 int GetCellType() {return VTK_QUADRATIC_HEXAHEDRON;}
00057 int GetCellDimension() {return 3;}
00058 int GetNumberOfEdges() {return 12;}
00059 int GetNumberOfFaces() {return 6;}
00060 vtkCell *GetEdge(int);
00061 vtkCell *GetFace(int);
00063
00064 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00065 void Contour(double value, vtkDataArray *cellScalars,
00066 vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00067 vtkCellArray *lines, vtkCellArray *polys,
00068 vtkPointData *inPd, vtkPointData *outPd,
00069 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
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 Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00076 void Derivatives(int subId, double pcoords[3], double *values,
00077 int dim, double *derivs);
00078 virtual double *GetParametricCoords();
00079
00081
00084 void Clip(double value, vtkDataArray *cellScalars,
00085 vtkIncrementalPointLocator *locator, vtkCellArray *tetras,
00086 vtkPointData *inPd, vtkPointData *outPd,
00087 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00088 int insideOut);
00090
00092
00094 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00095 double x[3], double pcoords[3], int& subId);
00097
00098
00100
00102 static void InterpolationFunctions(double pcoords[3], double weights[20]);
00103
00104
00105 static void InterpolationDerivs(double pcoords[3], double derivs[60]);
00106
00107
00108
00109 virtual void InterpolateFunctions(double pcoords[3], double weights[20])
00110 {
00111 vtkQuadraticHexahedron::InterpolationFunctions(pcoords,weights);
00112 }
00113 virtual void InterpolateDerivs(double pcoords[3], double derivs[60])
00114 {
00115 vtkQuadraticHexahedron::InterpolationDerivs(pcoords,derivs);
00116 }
00117
00118
00119
00120 static int *GetEdgeArray(int edgeId);
00121 static int *GetFaceArray(int faceId);
00123
00127 void JacobianInverse(double pcoords[3], double **inverse, double derivs[60]);
00128
00129 protected:
00130 vtkQuadraticHexahedron();
00131 ~vtkQuadraticHexahedron();
00132
00133 vtkQuadraticEdge *Edge;
00134 vtkQuadraticQuad *Face;
00135 vtkHexahedron *Hex;
00136 vtkPointData *PointData;
00137 vtkCellData *CellData;
00138 vtkDoubleArray *CellScalars;
00139 vtkDoubleArray *Scalars;
00140
00141 void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId,
00142 vtkDataArray *cellScalars);
00143
00144 private:
00145 vtkQuadraticHexahedron(const vtkQuadraticHexahedron&);
00146 void operator=(const vtkQuadraticHexahedron&);
00147 };
00148
00149 #endif
00150
00151