00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00054 #ifndef __vtkPyramid_h
00055 #define __vtkPyramid_h
00056
00057 #include "vtkCell.h"
00058 #include "vtkLine.h"
00059 #include "vtkTriangle.h"
00060 #include "vtkQuad.h"
00061
00062 class vtkUnstructuredGrid;
00063
00064 class VTK_EXPORT vtkPyramid : public vtkCell
00065 {
00066 public:
00067 vtkTypeMacro(vtkPyramid,vtkCell);
00068
00070 static vtkPyramid *New();
00071
00073 vtkCell *MakeObject();
00074 int GetCellType() {return VTK_PYRAMID;};
00075 int GetCellDimension() {return 3;};
00076 int GetNumberOfEdges() {return 8;};
00077 int GetNumberOfFaces() {return 5;};
00078 vtkCell *GetEdge(int edgeId);
00079 vtkCell *GetFace(int faceId);
00080 static int *GetFaceArray(int faceId);
00081 int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00082 void Contour(float value, vtkScalars *cellScalars,
00083 vtkPointLocator *locator, vtkCellArray *verts,
00084 vtkCellArray *lines, vtkCellArray *polys,
00085 vtkPointData *inPd, vtkPointData *outPd,
00086 vtkCellData *inCd, int cellId, vtkCellData *outCd);
00087 void Clip(float value, vtkScalars *cellScalars,
00088 vtkPointLocator *locator, vtkCellArray *cells,
00089 vtkPointData *inPd, vtkPointData *outPd,
00090 vtkCellData *inCd, int cellId, vtkCellData *outCd, int insideOut);
00091 int EvaluatePosition(float x[3], float* closestPoint,
00092 int& subId, float pcoords[3],
00093 float& dist2, float *weights);
00094 void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00095 float *weights);
00096 int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00097 float x[3], float pcoords[3], int& subId);
00098 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00099 void Derivatives(int subId, float pcoords[3], float *values,
00100 int dim, float *derivs);
00101
00103 int GetParametricCenter(float pcoords[3]);
00104
00107 static void InterpolationFunctions(float pcoords[3], float weights[5]);
00108 static void InterpolationDerivs(float pcoords[3], float derivs[15]);
00109 int JacobianInverse(float pcoords[3], double **inverse, float derivs[15]);
00110
00111 protected:
00112 vtkPyramid();
00113 ~vtkPyramid();
00114 vtkPyramid(const vtkPyramid&) {};
00115 void operator=(const vtkPyramid&) {};
00116
00117 vtkLine *Line;
00118 vtkTriangle *Triangle;
00119 vtkQuad *Quad;
00120
00121 };
00122
00123 inline int vtkPyramid::GetParametricCenter(float pcoords[3])
00124 {
00125 pcoords[0] = pcoords[1] = 0.5;
00126 pcoords[2] = 0.333333;
00127 return 0;
00128 }
00129
00130 #endif
00131
00132
00133