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 class vtkUnstructuredGrid;
00045 class vtkIncrementalPointLocator;
00046
00047 class VTK_FILTERING_EXPORT vtkWedge : public vtkCell3D
00048 {
00049 public:
00050 static vtkWedge *New();
00051 vtkTypeMacro(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 vtkIncrementalPointLocator *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
00092 static void InterpolationFunctions(double pcoords[3], double weights[6]);
00093
00094
00095 static void InterpolationDerivs(double pcoords[3], double derivs[18]);
00096
00097
00098
00099 virtual void InterpolateFunctions(double pcoords[3], double weights[6])
00100 {
00101 vtkWedge::InterpolationFunctions(pcoords,weights);
00102 }
00103 virtual void InterpolateDerivs(double pcoords[3], double derivs[18])
00104 {
00105 vtkWedge::InterpolationDerivs(pcoords,derivs);
00106 }
00107 int JacobianInverse(double pcoords[3], double **inverse, double derivs[18]);
00109
00111
00113 static int *GetEdgeArray(int edgeId);
00114 static int *GetFaceArray(int faceId);
00116
00117 protected:
00118 vtkWedge();
00119 ~vtkWedge();
00120
00121 vtkLine *Line;
00122 vtkTriangle *Triangle;
00123 vtkQuad *Quad;
00124
00125 private:
00126 vtkWedge(const vtkWedge&);
00127 void operator=(const vtkWedge&);
00128 };
00129
00130 inline int vtkWedge::GetParametricCenter(double pcoords[3])
00131 {
00132 pcoords[0] = pcoords[1] = 0.333333;
00133 pcoords[2] = 0.5;
00134 return 0;
00135 }
00136
00137 #endif
00138
00139
00140