00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00036 #ifndef __vtkWedge_h
00037 #define __vtkWedge_h
00038
00039 #include "vtkCell3D.h"
00040
00041 class vtkLine;
00042 class vtkTriangle;
00043 class vtkQuad;
00044
00045 class vtkUnstructuredGrid;
00046
00047 class VTK_FILTERING_EXPORT vtkWedge : public vtkCell3D
00048 {
00049 public:
00050 static vtkWedge *New();
00051 vtkTypeRevisionMacro(vtkWedge,vtkCell3D);
00052 void PrintSelf(ostream& os, vtkIndent indent);
00053
00055
00056 virtual void GetEdgePoints(int edgeId, int* &pts);
00057 virtual void GetFacePoints(int faceId, int* &pts);
00059
00061
00062 int GetCellType() {return VTK_WEDGE;}
00063 int GetCellDimension() {return 3;}
00064 int GetNumberOfEdges() {return 9;}
00065 int GetNumberOfFaces() {return 5;}
00066 vtkCell *GetEdge(int edgeId);
00067 vtkCell *GetFace(int faceId);
00068 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00069 void Contour(double value, vtkDataArray *cellScalars,
00070 vtkPointLocator *locator, vtkCellArray *verts,
00071 vtkCellArray *lines, vtkCellArray *polys,
00072 vtkPointData *inPd, vtkPointData *outPd,
00073 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00074 int EvaluatePosition(double x[3], double* closestPoint,
00075 int& subId, double pcoords[3],
00076 double& dist2, double *weights);
00077 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00078 double *weights);
00079 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00080 double x[3], double pcoords[3], int& subId);
00081 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00082 void Derivatives(int subId, double pcoords[3], double *values,
00083 int dim, double *derivs);
00084 virtual double *GetParametricCoords();
00086
00088 int GetParametricCenter(double pcoords[3]);
00089
00091
00093 static void InterpolationFunctions(double pcoords[3], double weights[6]);
00094 static void InterpolationDerivs(double pcoords[3], double derivs[18]);
00095 int JacobianInverse(double pcoords[3], double **inverse, double derivs[18]);
00096 static int *GetEdgeArray(int edgeId);
00097 static int *GetFaceArray(int faceId);
00099
00100 protected:
00101 vtkWedge();
00102 ~vtkWedge();
00103
00104 vtkLine *Line;
00105 vtkTriangle *Triangle;
00106 vtkQuad *Quad;
00107
00108 private:
00109 vtkWedge(const vtkWedge&);
00110 void operator=(const vtkWedge&);
00111 };
00112
00113 inline int vtkWedge::GetParametricCenter(double pcoords[3])
00114 {
00115 pcoords[0] = pcoords[1] = 0.333333;
00116 pcoords[2] = 0.5;
00117 return 0;
00118 }
00119
00120 #endif
00121
00122
00123