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