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

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 =========================================================================*/
00046 #ifndef __vtkQuadraticHexahedron_h
00047 #define __vtkQuadraticHexahedron_h
00048 
00049 #include "vtkNonLinearCell.h"
00050 
00051 class vtkPolyData;
00052 class vtkQuadraticEdge;
00053 class vtkQuadraticQuad;
00054 class vtkHexahedron;
00055 class vtkDoubleArray;
00056 
00057 class VTK_FILTERING_EXPORT vtkQuadraticHexahedron : public vtkNonLinearCell
00058 {
00059 public:
00060   static vtkQuadraticHexahedron *New();
00061   vtkTypeRevisionMacro(vtkQuadraticHexahedron,vtkNonLinearCell);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063 
00065 
00067   int GetCellType() {return VTK_QUADRATIC_HEXAHEDRON;}
00068   int GetCellDimension() {return 3;}
00069   int GetNumberOfEdges() {return 12;}
00070   int GetNumberOfFaces() {return 6;}
00071   vtkCell *GetEdge(int);
00072   vtkCell *GetFace(int);
00074 
00075   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00076   void Contour(double value, vtkDataArray *cellScalars, 
00077                vtkPointLocator *locator, vtkCellArray *verts, 
00078                vtkCellArray *lines, vtkCellArray *polys, 
00079                vtkPointData *inPd, vtkPointData *outPd,
00080                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00081   int EvaluatePosition(double x[3], double* closestPoint,
00082                        int& subId, double pcoords[3], 
00083                        double& dist2, double *weights);
00084   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00085                         double *weights);
00086   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00087   void Derivatives(int subId, double pcoords[3], double *values, 
00088                    int dim, double *derivs);
00089   virtual double *GetParametricCoords();
00090 
00092 
00095   void Clip(double value, vtkDataArray *cellScalars, 
00096             vtkPointLocator *locator, vtkCellArray *tetras,
00097             vtkPointData *inPd, vtkPointData *outPd,
00098             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00099             int insideOut);
00101 
00103 
00105   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00106                         double x[3], double pcoords[3], int& subId);
00108 
00109   
00111 
00112   static void InterpolationFunctions(double pcoords[3], double weights[20]);
00113   static void InterpolationDerivs(double pcoords[3], double derivs[60]);
00115 
00119   void JacobianInverse(double pcoords[3], double **inverse, double derivs[60]);
00120 
00121 protected:
00122   vtkQuadraticHexahedron();
00123   ~vtkQuadraticHexahedron();
00124 
00125   vtkQuadraticEdge *Edge;
00126   vtkQuadraticQuad *Face;
00127   vtkHexahedron    *Hex;
00128   vtkPointData     *PointData;
00129   vtkCellData      *CellData;
00130   vtkDoubleArray   *Scalars;
00131   
00132   void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId);
00133 
00134 private:
00135   vtkQuadraticHexahedron(const vtkQuadraticHexahedron&);  // Not implemented.
00136   void operator=(const vtkQuadraticHexahedron&);  // Not implemented.
00137 };
00138 
00139 #endif
00140 
00141