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