Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Common/vtkPyramid.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPyramid.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00037 #ifndef __vtkPyramid_h 00038 #define __vtkPyramid_h 00039 00040 #include "vtkCell3D.h" 00041 00042 class vtkLine; 00043 class vtkQuad; 00044 class vtkTriangle; 00045 class vtkUnstructuredGrid; 00046 00047 class VTK_COMMON_EXPORT vtkPyramid : public vtkCell3D 00048 { 00049 public: 00050 vtkTypeRevisionMacro(vtkPyramid,vtkCell3D); 00051 00053 static vtkPyramid *New(); 00054 00056 00057 virtual void GetEdgePoints(int edgeId, int* &pts); 00058 virtual void GetFacePoints(int faceId, int* &pts); 00059 virtual float *GetParametricCoords(); 00061 00063 00064 int GetCellType() {return VTK_PYRAMID;} 00065 int GetCellDimension() {return 3;} 00066 int GetNumberOfEdges() {return 8;} 00067 int GetNumberOfFaces() {return 5;} 00068 vtkCell *GetEdge(int edgeId); 00069 vtkCell *GetFace(int faceId); 00070 int CellBoundary(int subId, float pcoords[3], vtkIdList *pts); 00071 void Contour(float value, vtkDataArray *cellScalars, 00072 vtkPointLocator *locator, vtkCellArray *verts, 00073 vtkCellArray *lines, vtkCellArray *polys, 00074 vtkPointData *inPd, vtkPointData *outPd, 00075 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd); 00076 int EvaluatePosition(float x[3], float* closestPoint, 00077 int& subId, float pcoords[3], 00078 float& dist2, float *weights); 00079 void EvaluateLocation(int& subId, float pcoords[3], float x[3], 00080 float *weights); 00081 int IntersectWithLine(float p1[3], float p2[3], float tol, float& t, 00082 float x[3], float pcoords[3], int& subId); 00083 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts); 00084 void Derivatives(int subId, float pcoords[3], float *values, 00085 int dim, float *derivs); 00087 00089 int GetParametricCenter(float pcoords[3]); 00090 00092 00094 static void InterpolationFunctions(float pcoords[3], float weights[5]); 00095 static void InterpolationDerivs(float pcoords[3], float derivs[15]); 00096 int JacobianInverse(float pcoords[3], double **inverse, float derivs[15]); 00097 static int *GetEdgeArray(int edgeId); 00098 static int *GetFaceArray(int faceId); 00100 00101 protected: 00102 vtkPyramid(); 00103 ~vtkPyramid(); 00104 00105 vtkLine *Line; 00106 vtkTriangle *Triangle; 00107 vtkQuad *Quad; 00108 00109 private: 00110 vtkPyramid(const vtkPyramid&); // Not implemented. 00111 void operator=(const vtkPyramid&); // Not implemented. 00112 }; 00113 00114 inline int vtkPyramid::GetParametricCenter(float pcoords[3]) 00115 { 00116 pcoords[0] = pcoords[1] = 0.5f; 00117 pcoords[2] = 0.333333f; 00118 return 0; 00119 } 00120 00121 #endif 00122 00123 00124