00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00033 #ifndef __vtkWedge_h
00034 #define __vtkWedge_h
00035
00036 #include "vtkCell3D.h"
00037
00038 class vtkLine;
00039 class vtkTriangle;
00040 class vtkQuad;
00041
00042 class vtkUnstructuredGrid;
00043
00044 class VTK_FILTERING_EXPORT vtkWedge : public vtkCell3D
00045 {
00046 public:
00047 static vtkWedge *New();
00048 vtkTypeRevisionMacro(vtkWedge,vtkCell3D);
00049 void PrintSelf(ostream& os, vtkIndent indent);
00050
00052
00053 virtual void GetEdgePoints(int edgeId, int* &pts);
00054 virtual void GetFacePoints(int faceId, int* &pts);
00056
00058
00059 int GetCellType() {return VTK_WEDGE;}
00060 int GetCellDimension() {return 3;}
00061 int GetNumberOfEdges() {return 9;}
00062 int GetNumberOfFaces() {return 5;}
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 vtkPointLocator *locator, vtkCellArray *verts,
00068 vtkCellArray *lines, vtkCellArray *polys,
00069 vtkPointData *inPd, vtkPointData *outPd,
00070 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00071 int EvaluatePosition(double x[3], double* closestPoint,
00072 int& subId, double pcoords[3],
00073 double& dist2, double *weights);
00074 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00075 double *weights);
00076 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00077 double x[3], double pcoords[3], int& subId);
00078 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00079 void Derivatives(int subId, double pcoords[3], double *values,
00080 int dim, double *derivs);
00081 virtual double *GetParametricCoords();
00083
00085 int GetParametricCenter(double pcoords[3]);
00086
00088
00089 static void InterpolationFunctions(double pcoords[3], double weights[6]);
00090
00091
00092 static void InterpolationDerivs(double pcoords[3], double derivs[18]);
00093
00094
00095
00096 virtual void InterpolateFunctions(double pcoords[3], double weights[6])
00097 {
00098 vtkWedge::InterpolationFunctions(pcoords,weights);
00099 }
00100 virtual void InterpolateDerivs(double pcoords[3], double derivs[18])
00101 {
00102 vtkWedge::InterpolationDerivs(pcoords,derivs);
00103 }
00104 int JacobianInverse(double pcoords[3], double **inverse, double derivs[18]);
00106
00108
00110 static int *GetEdgeArray(int edgeId);
00111 static int *GetFaceArray(int faceId);
00113
00114 protected:
00115 vtkWedge();
00116 ~vtkWedge();
00117
00118 vtkLine *Line;
00119 vtkTriangle *Triangle;
00120 vtkQuad *Quad;
00121
00122 private:
00123 vtkWedge(const vtkWedge&);
00124 void operator=(const vtkWedge&);
00125 };
00126
00127 inline int vtkWedge::GetParametricCenter(double pcoords[3])
00128 {
00129 pcoords[0] = pcoords[1] = 0.333333;
00130 pcoords[2] = 0.5;
00131 return 0;
00132 }
00133
00134 #endif
00135
00136
00137