00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00051 #ifndef __vtkQuadraticHexahedron_h
00052 #define __vtkQuadraticHexahedron_h
00053
00054 #include "vtkNonLinearCell.h"
00055
00056 class vtkPolyData;
00057 class vtkQuadraticEdge;
00058 class vtkQuadraticQuad;
00059 class vtkHexahedron;
00060
00061 class VTK_COMMON_EXPORT vtkQuadraticHexahedron : public vtkNonLinearCell
00062 {
00063 public:
00064 static vtkQuadraticHexahedron *New();
00065 vtkTypeRevisionMacro(vtkQuadraticHexahedron,vtkNonLinearCell);
00066
00068
00070 int GetCellType() {return VTK_QUADRATIC_HEXAHEDRON;}
00071 int GetCellDimension() {return 3;}
00072 int GetNumberOfEdges() {return 12;}
00073 int GetNumberOfFaces() {return 6;}
00074 vtkCell *GetEdge(int);
00075 vtkCell *GetFace(int);
00077
00078 int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00079 void Contour(float value, vtkDataArray *cellScalars,
00080 vtkPointLocator *locator, vtkCellArray *verts,
00081 vtkCellArray *lines, vtkCellArray *polys,
00082 vtkPointData *inPd, vtkPointData *outPd,
00083 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00084 int EvaluatePosition(float x[3], float* closestPoint,
00085 int& subId, float pcoords[3],
00086 float& dist2, float *weights);
00087 void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00088 float *weights);
00089 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00090 void Derivatives(int subId, float pcoords[3], float *values,
00091 int dim, float *derivs);
00092
00094
00097 void Clip(float value, vtkDataArray *cellScalars,
00098 vtkPointLocator *locator, vtkCellArray *tetras,
00099 vtkPointData *inPd, vtkPointData *outPd,
00100 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00101 int insideOut);
00103
00105
00107 int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00108 float x[3], float pcoords[3], int& subId);
00110
00111
00113
00114 static void InterpolationFunctions(float pcoords[3], float weights[3]);
00115 static void InterpolationDerivs(float pcoords[3], float derivs[3]);
00117
00121 void JacobianInverse(float pcoords[3], double **inverse, float derivs[60]);
00122
00123 protected:
00124 vtkQuadraticHexahedron();
00125 ~vtkQuadraticHexahedron();
00126
00127 vtkQuadraticEdge *Edge;
00128 vtkQuadraticQuad *Face;
00129 vtkHexahedron *Hex;
00130 vtkPointData *PointData;
00131 vtkCellData *CellData;
00132 vtkFloatArray *Scalars;
00133
00134 void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId);
00135
00136 private:
00137 vtkQuadraticHexahedron(const vtkQuadraticHexahedron&);
00138 void operator=(const vtkQuadraticHexahedron&);
00139 };
00140
00141 #endif
00142
00143