00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00056 #ifndef __vtkHexahedron_h
00057 #define __vtkHexahedron_h
00058
00059 #include "vtkCell3D.h"
00060 #include "vtkLine.h"
00061 #include "vtkQuad.h"
00062
00063 class VTK_COMMON_EXPORT vtkHexahedron : public vtkCell3D
00064 {
00065 public:
00066 static vtkHexahedron *New();
00067 vtkTypeMacro(vtkHexahedron,vtkCell);
00068
00070
00071 virtual void GetEdgePoints(int edgeId, int* &pts);
00072 virtual void GetFacePoints(int faceId, int* &pts);
00074
00076
00077 vtkCell *MakeObject();
00078 int GetCellType() {return VTK_HEXAHEDRON;}
00079 int GetNumberOfEdges() {return 12;}
00080 int GetNumberOfFaces() {return 6;}
00081 vtkCell *GetEdge(int edgeId);
00082 vtkCell *GetFace(int faceId);
00083 int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00084 void Contour(float value, vtkDataArray *cellScalars,
00085 vtkPointLocator *locator, vtkCellArray *verts,
00086 vtkCellArray *lines, vtkCellArray *polys,
00087 vtkPointData *inPd, vtkPointData *outPd,
00088 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00090
00091 int EvaluatePosition(float x[3], float* closestPoint,
00092 int& subId, float pcoords[3],
00093 float& dist2, float *weights);
00094 void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00095 float *weights);
00096 int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00097 float x[3], float pcoords[3], int& subId);
00098 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00099 void Derivatives(int subId, float pcoords[3], float *values,
00100 int dim, float *derivs);
00101
00103
00104 static void InterpolationFunctions(float pcoords[3], float weights[8]);
00105 static void InterpolationDerivs(float pcoords[3], float derivs[24]);
00106 static int *GetEdgeArray(int edgeId);
00107 static int *GetFaceArray(int faceId);
00109
00113 void JacobianInverse(float pcoords[3], double **inverse, float derivs[24]);
00114
00115 protected:
00116 vtkHexahedron();
00117 ~vtkHexahedron();
00118
00119 vtkLine *Line;
00120 vtkQuad *Quad;
00121
00122 private:
00123 vtkHexahedron(const vtkHexahedron&);
00124 void operator=(const vtkHexahedron&);
00125 };
00126
00127 #endif
00128
00129