00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00036 #ifndef __vtkHexahedron_h
00037 #define __vtkHexahedron_h
00038
00039 #include "vtkCell3D.h"
00040
00041 class vtkLine;
00042 class vtkQuad;
00043 class vtkIncrementalPointLocator;
00044
00045 class VTK_FILTERING_EXPORT vtkHexahedron : public vtkCell3D
00046 {
00047 public:
00048 static vtkHexahedron *New();
00049 vtkTypeMacro(vtkHexahedron,vtkCell3D);
00050 void PrintSelf(ostream& os, vtkIndent indent);
00051
00053
00054 virtual void GetEdgePoints(int edgeId, int* &pts);
00055 virtual void GetFacePoints(int faceId, int* &pts);
00057
00059
00060 int GetCellType() {return VTK_HEXAHEDRON;}
00061 int GetNumberOfEdges() {return 12;}
00062 int GetNumberOfFaces() {return 6;}
00063 vtkCell *GetEdge(int edgeId);
00064 vtkCell *GetFace(int faceId);
00065 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00066 void Contour(double value, vtkDataArray *cellScalars,
00067 vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00068 vtkCellArray *lines, vtkCellArray *polys,
00069 vtkPointData *inPd, vtkPointData *outPd,
00070 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00072
00073 int EvaluatePosition(double x[3], double* closestPoint,
00074 int& subId, double pcoords[3],
00075 double& dist2, double *weights);
00076 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00077 double *weights);
00078 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00079 double x[3], double pcoords[3], int& subId);
00080 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00081 void Derivatives(int subId, double pcoords[3], double *values,
00082 int dim, double *derivs);
00083 virtual double *GetParametricCoords();
00084
00086
00088 static void InterpolationFunctions(double pcoords[3], double weights[8]);
00089
00090
00091 static void InterpolationDerivs(double pcoords[3], double derivs[24]);
00092
00093
00094
00095 virtual void InterpolateFunctions(double pcoords[3], double weights[8])
00096 {
00097 vtkHexahedron::InterpolationFunctions(pcoords,weights);
00098 }
00099 virtual void InterpolateDerivs(double pcoords[3], double derivs[24])
00100 {
00101 vtkHexahedron::InterpolationDerivs(pcoords,derivs);
00102 }
00104
00106
00108 static int *GetEdgeArray(int edgeId);
00109 static int *GetFaceArray(int faceId);
00111
00115 void JacobianInverse(double pcoords[3], double **inverse, double derivs[24]);
00116
00117 protected:
00118 vtkHexahedron();
00119 ~vtkHexahedron();
00120
00121 vtkLine *Line;
00122 vtkQuad *Quad;
00123
00124 private:
00125 vtkHexahedron(const vtkHexahedron&);
00126 void operator=(const vtkHexahedron&);
00127 };
00128
00129 #endif
00130
00131