Common/vtkPyramid.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 __vtkPyramid_h
00050 #define __vtkPyramid_h
00051
00052 #include "vtkCell3D.h"
00053
00054 class vtkLine;
00055 class vtkQuad;
00056 class vtkTriangle;
00057 class vtkUnstructuredGrid;
00058
00059 class VTK_COMMON_EXPORT vtkPyramid : public vtkCell3D
00060 {
00061 public:
00062 vtkTypeRevisionMacro(vtkPyramid,vtkCell3D);
00063
00065 static vtkPyramid *New();
00066
00068
00069 virtual void GetEdgePoints(int edgeId, int* &pts);
00070 virtual void GetFacePoints(int faceId, int* &pts);
00071 virtual float *GetParametricCoords();
00073
00075
00076 int GetCellType() {return VTK_PYRAMID;}
00077 int GetCellDimension() {return 3;}
00078 int GetNumberOfEdges() {return 8;}
00079 int GetNumberOfFaces() {return 5;}
00080 vtkCell *GetEdge(int edgeId);
00081 vtkCell *GetFace(int faceId);
00082 int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00083 void Contour(float value, vtkDataArray *cellScalars,
00084 vtkPointLocator *locator, vtkCellArray *verts,
00085 vtkCellArray *lines, vtkCellArray *polys,
00086 vtkPointData *inPd, vtkPointData *outPd,
00087 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00088 int EvaluatePosition(float x[3], float* closestPoint,
00089 int& subId, float pcoords[3],
00090 float& dist2, float *weights);
00091 void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00092 float *weights);
00093 int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00094 float x[3], float pcoords[3], int& subId);
00095 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00096 void Derivatives(int subId, float pcoords[3], float *values,
00097 int dim, float *derivs);
00099
00101 int GetParametricCenter(float pcoords[3]);
00102
00104
00106 static void InterpolationFunctions(float pcoords[3], float weights[5]);
00107 static void InterpolationDerivs(float pcoords[3], float derivs[15]);
00108 int JacobianInverse(float pcoords[3], double **inverse, float derivs[15]);
00109 static int *GetEdgeArray(int edgeId);
00110 static int *GetFaceArray(int faceId);
00112
00113 protected:
00114 vtkPyramid();
00115 ~vtkPyramid();
00116
00117 vtkLine *Line;
00118 vtkTriangle *Triangle;
00119 vtkQuad *Quad;
00120
00121 private:
00122 vtkPyramid(const vtkPyramid&);
00123 void operator=(const vtkPyramid&);
00124 };
00125
00126 inline int vtkPyramid::GetParametricCenter(float pcoords[3])
00127 {
00128 pcoords[0] = pcoords[1] = 0.5f;
00129 pcoords[2] = 0.333333f;
00130 return 0;
00131 }
00132
00133 #endif
00134
00135
00136