00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00033 #ifndef __vtkHexahedron_h
00034 #define __vtkHexahedron_h
00035
00036 #include "vtkCell3D.h"
00037
00038 class vtkLine;
00039 class vtkQuad;
00040
00041 class VTK_FILTERING_EXPORT vtkHexahedron : public vtkCell3D
00042 {
00043 public:
00044 static vtkHexahedron *New();
00045 vtkTypeRevisionMacro(vtkHexahedron,vtkCell3D);
00046 void PrintSelf(ostream& os, vtkIndent indent);
00047
00049
00050 virtual void GetEdgePoints(int edgeId, int* &pts);
00051 virtual void GetFacePoints(int faceId, int* &pts);
00053
00055
00056 int GetCellType() {return VTK_HEXAHEDRON;}
00057 int GetNumberOfEdges() {return 12;}
00058 int GetNumberOfFaces() {return 6;}
00059 vtkCell *GetEdge(int edgeId);
00060 vtkCell *GetFace(int faceId);
00061 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00062 void Contour(double value, vtkDataArray *cellScalars,
00063 vtkPointLocator *locator, vtkCellArray *verts,
00064 vtkCellArray *lines, vtkCellArray *polys,
00065 vtkPointData *inPd, vtkPointData *outPd,
00066 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00068
00069 int EvaluatePosition(double x[3], double* closestPoint,
00070 int& subId, double pcoords[3],
00071 double& dist2, double *weights);
00072 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00073 double *weights);
00074 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00075 double x[3], double pcoords[3], int& subId);
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
00084 static void InterpolationFunctions(double pcoords[3], double weights[8]);
00085
00086
00087 static void InterpolationDerivs(double pcoords[3], double derivs[24]);
00088
00089
00090
00091 virtual void InterpolateFunctions(double pcoords[3], double weights[8])
00092 {
00093 vtkHexahedron::InterpolationFunctions(pcoords,weights);
00094 }
00095 virtual void InterpolateDerivs(double pcoords[3], double derivs[24])
00096 {
00097 vtkHexahedron::InterpolationDerivs(pcoords,derivs);
00098 }
00100
00102
00104 static int *GetEdgeArray(int edgeId);
00105 static int *GetFaceArray(int faceId);
00107
00111 void JacobianInverse(double pcoords[3], double **inverse, double derivs[24]);
00112
00113 protected:
00114 vtkHexahedron();
00115 ~vtkHexahedron();
00116
00117 vtkLine *Line;
00118 vtkQuad *Quad;
00119
00120 private:
00121 vtkHexahedron(const vtkHexahedron&);
00122 void operator=(const vtkHexahedron&);
00123 };
00124
00125 #endif
00126
00127