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

Common/vtkHexahedron.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkHexahedron.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 =========================================================================*/
00050 #ifndef __vtkHexahedron_h
00051 #define __vtkHexahedron_h
00052 
00053 #include "vtkCell3D.h"
00054 
00055 class vtkLine;
00056 class vtkQuad;
00057 
00058 class VTK_COMMON_EXPORT vtkHexahedron : public vtkCell3D
00059 {
00060 public:
00061   static vtkHexahedron *New();
00062   vtkTypeRevisionMacro(vtkHexahedron,vtkCell3D);
00063 
00065 
00066   virtual void GetEdgePoints(int edgeId, int* &pts);
00067   virtual void GetFacePoints(int faceId, int* &pts);
00068   virtual float *GetParametricCoords();
00070 
00072 
00073   int GetCellType() {return VTK_HEXAHEDRON;}
00074   int GetNumberOfEdges() {return 12;}
00075   int GetNumberOfFaces() {return 6;}
00076   vtkCell *GetEdge(int edgeId);
00077   vtkCell *GetFace(int faceId);
00078   int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00079   void Contour(float value, vtkDataArray *cellScalars, 
00080                vtkPointLocator *locator, vtkCellArray *verts, 
00081                vtkCellArray *lines, vtkCellArray *polys,
00082                vtkPointData *inPd, vtkPointData *outPd,
00083                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00085 
00086   int EvaluatePosition(float x[3], float* closestPoint,
00087                        int& subId, float pcoords[3],
00088                        float& dist2, float *weights);
00089   void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00090                         float *weights);
00091   int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00092                         float x[3], float pcoords[3], int& subId);
00093   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00094   void Derivatives(int subId, float pcoords[3], float *values, 
00095                    int dim, float *derivs);
00096 
00098 
00099   static void InterpolationFunctions(float pcoords[3], float weights[8]);
00100   static void InterpolationDerivs(float pcoords[3], float derivs[24]);
00101   static int *GetEdgeArray(int edgeId);
00102   static int *GetFaceArray(int faceId);
00104 
00108   void JacobianInverse(float pcoords[3], double **inverse, float derivs[24]);
00109 
00110 protected:
00111   vtkHexahedron();
00112   ~vtkHexahedron();
00113 
00114   vtkLine *Line;
00115   vtkQuad *Quad;
00116 
00117 private:
00118   vtkHexahedron(const vtkHexahedron&);  // Not implemented.
00119   void operator=(const vtkHexahedron&);  // Not implemented.
00120 };
00121 
00122 #endif
00123 
00124