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 class vtkIncrementalPointLocator;
00041
00042 class VTK_FILTERING_EXPORT vtkHexahedron : public vtkCell3D
00043 {
00044 public:
00045 static vtkHexahedron *New();
00046 vtkTypeRevisionMacro(vtkHexahedron,vtkCell3D);
00047 void PrintSelf(ostream& os, vtkIndent indent);
00048
00050
00051 virtual void GetEdgePoints(int edgeId, int* &pts);
00052 virtual void GetFacePoints(int faceId, int* &pts);
00054
00056
00057 int GetCellType() {return VTK_HEXAHEDRON;}
00058 int GetNumberOfEdges() {return 12;}
00059 int GetNumberOfFaces() {return 6;}
00060 vtkCell *GetEdge(int edgeId);
00061 vtkCell *GetFace(int faceId);
00062 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00063 void Contour(double value, vtkDataArray *cellScalars,
00064 vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00065 vtkCellArray *lines, vtkCellArray *polys,
00066 vtkPointData *inPd, vtkPointData *outPd,
00067 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00069
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 IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00076 double x[3], double pcoords[3], int& subId);
00077 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00078 void Derivatives(int subId, double pcoords[3], double *values,
00079 int dim, double *derivs);
00080 virtual double *GetParametricCoords();
00081
00083
00085 static void InterpolationFunctions(double pcoords[3], double weights[8]);
00086
00087
00088 static void InterpolationDerivs(double pcoords[3], double derivs[24]);
00089
00090
00091
00092 virtual void InterpolateFunctions(double pcoords[3], double weights[8])
00093 {
00094 vtkHexahedron::InterpolationFunctions(pcoords,weights);
00095 }
00096 virtual void InterpolateDerivs(double pcoords[3], double derivs[24])
00097 {
00098 vtkHexahedron::InterpolationDerivs(pcoords,derivs);
00099 }
00101
00103
00105 static int *GetEdgeArray(int edgeId);
00106 static int *GetFaceArray(int faceId);
00108
00112 void JacobianInverse(double pcoords[3], double **inverse, double derivs[24]);
00113
00114 protected:
00115 vtkHexahedron();
00116 ~vtkHexahedron();
00117
00118 vtkLine *Line;
00119 vtkQuad *Quad;
00120
00121 private:
00122 vtkHexahedron(const vtkHexahedron&);
00123 void operator=(const vtkHexahedron&);
00124 };
00125
00126 #endif
00127
00128