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