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

Common/vtkQuadraticHexahedron.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkQuadraticHexahedron.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 =========================================================================*/
00036 #ifndef __vtkQuadraticHexahedron_h
00037 #define __vtkQuadraticHexahedron_h
00038 
00039 #include "vtkNonLinearCell.h"
00040 
00041 class vtkPolyData;
00042 class vtkQuadraticEdge;
00043 class vtkQuadraticQuad;
00044 class vtkHexahedron;
00045 class vtkDoubleArray;
00046 
00047 class VTK_COMMON_EXPORT vtkQuadraticHexahedron : public vtkNonLinearCell
00048 {
00049 public:
00050   static vtkQuadraticHexahedron *New();
00051   vtkTypeRevisionMacro(vtkQuadraticHexahedron,vtkNonLinearCell);
00052 
00054 
00056   int GetCellType() {return VTK_QUADRATIC_HEXAHEDRON;}
00057   int GetCellDimension() {return 3;}
00058   int GetNumberOfEdges() {return 12;}
00059   int GetNumberOfFaces() {return 6;}
00060   vtkCell *GetEdge(int);
00061   vtkCell *GetFace(int);
00063 
00064   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00065   void Contour(double value, vtkDataArray *cellScalars, 
00066                vtkPointLocator *locator, vtkCellArray *verts, 
00067                vtkCellArray *lines, vtkCellArray *polys, 
00068                vtkPointData *inPd, vtkPointData *outPd,
00069                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00070   int EvaluatePosition(double x[3], double* closestPoint,
00071                        int& subId, double pcoords[3], 
00072                        double& dist2, double *weights);
00073   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00074                         double *weights);
00075   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00076   void Derivatives(int subId, double pcoords[3], double *values, 
00077                    int dim, double *derivs);
00078   virtual double *GetParametricCoords();
00079 
00081 
00084   void Clip(double value, vtkDataArray *cellScalars, 
00085             vtkPointLocator *locator, vtkCellArray *tetras,
00086             vtkPointData *inPd, vtkPointData *outPd,
00087             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00088             int insideOut);
00090 
00092 
00094   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00095                         double x[3], double pcoords[3], int& subId);
00097 
00098   
00100 
00101   static void InterpolationFunctions(double pcoords[3], double weights[20]);
00102   static void InterpolationDerivs(double pcoords[3], double derivs[60]);
00104 
00108   void JacobianInverse(double pcoords[3], double **inverse, double derivs[60]);
00109 
00110 protected:
00111   vtkQuadraticHexahedron();
00112   ~vtkQuadraticHexahedron();
00113 
00114   vtkQuadraticEdge *Edge;
00115   vtkQuadraticQuad *Face;
00116   vtkHexahedron    *Hex;
00117   vtkPointData     *PointData;
00118   vtkCellData      *CellData;
00119   vtkDoubleArray    *Scalars;
00120   
00121   void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId);
00122 
00123 private:
00124   vtkQuadraticHexahedron(const vtkQuadraticHexahedron&);  // Not implemented.
00125   void operator=(const vtkQuadraticHexahedron&);  // Not implemented.
00126 };
00127 
00128 #endif
00129 
00130