VTK
dox/Filtering/vtkBiQuadraticQuadraticHexahedron.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkBiQuadraticQuadraticHexahedron.h
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 =========================================================================*/
00070 #ifndef __vtkBiQuadraticQuadraticHexahedron_h
00071 #define __vtkBiQuadraticQuadraticHexahedron_h
00072 
00073 #include "vtkNonLinearCell.h"
00074 
00075 class vtkQuadraticEdge;
00076 class vtkQuadraticQuad;
00077 class vtkBiQuadraticQuad;
00078 class vtkHexahedron;
00079 class vtkDoubleArray;
00080 
00081 class VTK_FILTERING_EXPORT vtkBiQuadraticQuadraticHexahedron : public vtkNonLinearCell
00082 {
00083 public:
00084   static vtkBiQuadraticQuadraticHexahedron *New();
00085   vtkTypeMacro(vtkBiQuadraticQuadraticHexahedron,vtkNonLinearCell);
00086   void PrintSelf(ostream& os, vtkIndent indent);
00087 
00089 
00091   int GetCellType() {return VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON;}
00092   int GetCellDimension() {return 3;}
00093   int GetNumberOfEdges() {return 12;}
00094   int GetNumberOfFaces() {return 6;}
00095   vtkCell *GetEdge(int);
00096   vtkCell *GetFace(int);
00098 
00099   int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00100   void Contour(double value, vtkDataArray *cellScalars,
00101                vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00102                vtkCellArray *lines, vtkCellArray *polys,
00103                vtkPointData *inPd, vtkPointData *outPd,
00104                vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00105   int EvaluatePosition(double x[3], double* closestPoint,
00106                        int& subId, double pcoords[3],
00107                        double& dist2, double *weights);
00108   void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00109                         double *weights);
00110   int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00111   void Derivatives(int subId, double pcoords[3], double *values,
00112                    int dim, double *derivs);
00113   virtual double *GetParametricCoords();
00114 
00116 
00119   void Clip(double value, vtkDataArray *cellScalars,
00120             vtkIncrementalPointLocator *locator, vtkCellArray *tetras,
00121             vtkPointData *inPd, vtkPointData *outPd,
00122             vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00123             int insideOut);
00125 
00127 
00129   int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00130                         double x[3], double pcoords[3], int& subId);
00132 
00135   static void InterpolationFunctions(double pcoords[3], double weights[24]);
00138   static void InterpolationDerivs(double pcoords[3], double derivs[72]);
00140 
00142   virtual void InterpolateFunctions(double pcoords[3], double weights[24])
00143     {
00144     vtkBiQuadraticQuadraticHexahedron::InterpolationFunctions(pcoords,weights);
00145     }
00146   virtual void InterpolateDerivs(double pcoords[3], double derivs[72])
00147     {
00148     vtkBiQuadraticQuadraticHexahedron::InterpolationDerivs(pcoords,derivs);
00149     }
00151 
00152 
00154   static int *GetEdgeArray(int edgeId);
00155   static int *GetFaceArray(int faceId);
00157 
00161   void JacobianInverse(double pcoords[3], double **inverse, double derivs[72]);
00162 
00163 protected:
00164   vtkBiQuadraticQuadraticHexahedron();
00165   ~vtkBiQuadraticQuadraticHexahedron();
00166 
00167   vtkQuadraticEdge *Edge;
00168   vtkQuadraticQuad *Face;
00169   vtkBiQuadraticQuad *BiQuadFace;
00170   vtkHexahedron    *Hex;
00171   vtkPointData     *PointData;
00172   vtkCellData      *CellData;
00173   vtkDoubleArray   *CellScalars;
00174   vtkDoubleArray   *Scalars;
00175 
00176   void Subdivide(vtkPointData *inPd, vtkCellData *inCd, vtkIdType cellId,
00177     vtkDataArray *cellScalars);
00178 
00179 private:
00180   vtkBiQuadraticQuadraticHexahedron(const vtkBiQuadraticQuadraticHexahedron&);  // Not implemented.
00181   void operator=(const vtkBiQuadraticQuadraticHexahedron&);  // Not implemented.
00182 };
00183 
00184 #endif
00185 
00186