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

vtkHexahedron.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkHexahedron.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00046 #ifndef __vtkHexahedron_h
00047 #define __vtkHexahedron_h
00048 
00049 #include "vtkCell3D.h"
00050 
00051 class vtkLine;
00052 class vtkQuad;
00053 
00054 class VTK_FILTERING_EXPORT vtkHexahedron : public vtkCell3D
00055 {
00056 public:
00057   static vtkHexahedron *New();
00058   vtkTypeRevisionMacro(vtkHexahedron,vtkCell3D);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00062 
00063   virtual void GetEdgePoints(int edgeId, int* &pts);
00064   virtual void GetFacePoints(int faceId, int* &pts);
00066 
00068 
00069   int GetCellType() {return VTK_HEXAHEDRON;}
00070   int GetNumberOfEdges() {return 12;}
00071   int GetNumberOfFaces() {return 6;}
00072   vtkCell *GetEdge(int edgeId);
00073   vtkCell *GetFace(int faceId);
00074   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00075   void Contour(double value, vtkDataArray *cellScalars, 
00076                vtkPointLocator *locator, vtkCellArray *verts, 
00077                vtkCellArray *lines, vtkCellArray *polys,
00078                vtkPointData *inPd, vtkPointData *outPd,
00079                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00081 
00082   int EvaluatePosition(double x[3], double* closestPoint,
00083                        int& subId, double pcoords[3],
00084                        double& dist2, double *weights);
00085   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00086                         double *weights);
00087   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00088                         double x[3], double pcoords[3], int& subId);
00089   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00090   void Derivatives(int subId, double pcoords[3], double *values, 
00091                    int dim, double *derivs);
00092   virtual double *GetParametricCoords();
00093 
00095 
00096   static void InterpolationFunctions(double pcoords[3], double weights[8]);
00097   static void InterpolationDerivs(double pcoords[3], double derivs[24]);
00098   static int *GetEdgeArray(int edgeId);
00099   static int *GetFaceArray(int faceId);
00101 
00105   void JacobianInverse(double pcoords[3], double **inverse, double derivs[24]);
00106 
00107 protected:
00108   vtkHexahedron();
00109   ~vtkHexahedron();
00110 
00111   vtkLine *Line;
00112   vtkQuad *Quad;
00113 
00114 private:
00115   vtkHexahedron(const vtkHexahedron&);  // Not implemented.
00116   void operator=(const vtkHexahedron&);  // Not implemented.
00117 };
00118 
00119 #endif
00120 
00121