VTK
dox/Filtering/vtkTriQuadraticHexahedron.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkTriQuadraticHexahedron.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 =========================================================================*/
00073 #ifndef __vtkTriQuadraticHexahedron_h
00074 #define __vtkTriQuadraticHexahedron_h
00075 
00076 #include "vtkNonLinearCell.h"
00077 
00078 class vtkQuadraticEdge;
00079 class vtkBiQuadraticQuad;
00080 class vtkHexahedron;
00081 class vtkDoubleArray;
00082 
00083 class VTK_FILTERING_EXPORT vtkTriQuadraticHexahedron : public vtkNonLinearCell
00084 {
00085 public:
00086   static vtkTriQuadraticHexahedron *New ();
00087   vtkTypeMacro(vtkTriQuadraticHexahedron,vtkNonLinearCell);
00088   void PrintSelf (ostream & os, vtkIndent indent);
00089 
00091 
00093   int GetCellType () { return VTK_TRIQUADRATIC_HEXAHEDRON; }
00094   int GetCellDimension () { return 3; }
00095   int GetNumberOfEdges () { return 12; }
00096   int GetNumberOfFaces () { return 6; }
00097   vtkCell *GetEdge (int);
00098   vtkCell *GetFace (int);
00100 
00101   int CellBoundary (int subId, double pcoords[3], vtkIdList * pts);
00102   void Contour (double value, vtkDataArray * cellScalars,
00103     vtkIncrementalPointLocator * locator, vtkCellArray * verts,
00104     vtkCellArray * lines, vtkCellArray * polys,
00105     vtkPointData * inPd, vtkPointData * outPd, vtkCellData * inCd,
00106     vtkIdType cellId, vtkCellData * outCd);
00107   int EvaluatePosition (double x[3], double *closestPoint,
00108     int &subId, double pcoords[3], double &dist2, double *weights);
00109   void EvaluateLocation (int &subId, double pcoords[3], double x[3], double *weights);
00110   int Triangulate (int index, vtkIdList * ptIds, vtkPoints * pts);
00111   void Derivatives (int subId, double pcoords[3], double *values, int dim, double *derivs);
00112   virtual double *GetParametricCoords ();
00113 
00115 
00118   void Clip (double value, vtkDataArray * cellScalars,
00119        vtkIncrementalPointLocator * locator, vtkCellArray * tetras,
00120        vtkPointData * inPd, vtkPointData * outPd,
00121        vtkCellData * inCd, vtkIdType cellId, vtkCellData * outCd, int insideOut);
00123 
00125 
00127   int IntersectWithLine (double p1[3], double p2[3], double tol, double &t,
00128     double x[3], double pcoords[3], int &subId);
00130 
00133   static void InterpolationFunctions (double pcoords[3], double weights[27]);
00136   static void InterpolationDerivs (double pcoords[3], double derivs[81]);
00138 
00140   virtual void InterpolateFunctions (double pcoords[3], double weights[27])
00141     {
00142     vtkTriQuadraticHexahedron::InterpolationFunctions(pcoords,weights);
00143     }
00144   virtual void InterpolateDerivs (double pcoords[3], double derivs[81])
00145     {
00146     vtkTriQuadraticHexahedron::InterpolationDerivs(pcoords,derivs);
00147     }
00149 
00150 
00152   static int *GetEdgeArray(int edgeId);
00153   static int *GetFaceArray(int faceId);
00155 
00159   void JacobianInverse (double pcoords[3], double **inverse, double derivs[81]);
00160 
00161 protected:
00162   vtkTriQuadraticHexahedron ();
00163   ~vtkTriQuadraticHexahedron ();
00164 
00165   vtkQuadraticEdge *Edge;
00166   vtkBiQuadraticQuad *Face;
00167   vtkHexahedron *Hex;
00168   vtkDoubleArray *Scalars;
00169 
00170 private:
00171   vtkTriQuadraticHexahedron (const vtkTriQuadraticHexahedron &);  // Not implemented.
00172   void operator = (const vtkTriQuadraticHexahedron &);  // Not implemented.
00173 };
00174 
00175 #endif