VTK
vtkTriQuadraticHexahedron.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTriQuadraticHexahedron.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
73 #ifndef __vtkTriQuadraticHexahedron_h
74 #define __vtkTriQuadraticHexahedron_h
75 
76 #include "vtkNonLinearCell.h"
77 
78 class vtkQuadraticEdge;
79 class vtkBiQuadraticQuad;
80 class vtkHexahedron;
81 class vtkDoubleArray;
82 
84 {
85 public:
86  static vtkTriQuadraticHexahedron *New ();
88  void PrintSelf (ostream & os, vtkIndent indent);
89 
91 
94  int GetCellDimension () { return 3; }
95  int GetNumberOfEdges () { return 12; }
96  int GetNumberOfFaces () { return 6; }
97  vtkCell *GetEdge (int);
98  vtkCell *GetFace (int);
100 
101  int CellBoundary (int subId, double pcoords[3], vtkIdList * pts);
102  void Contour (double value, vtkDataArray * cellScalars,
103  vtkIncrementalPointLocator * locator, vtkCellArray * verts,
104  vtkCellArray * lines, vtkCellArray * polys,
105  vtkPointData * inPd, vtkPointData * outPd, vtkCellData * inCd,
106  vtkIdType cellId, vtkCellData * outCd);
107  int EvaluatePosition (double x[3], double *closestPoint,
108  int &subId, double pcoords[3], double &dist2, double *weights);
109  void EvaluateLocation (int &subId, double pcoords[3], double x[3], double *weights);
110  int Triangulate (int index, vtkIdList * ptIds, vtkPoints * pts);
111  void Derivatives (int subId, double pcoords[3], double *values, int dim, double *derivs);
112  virtual double *GetParametricCoords ();
113 
115 
118  void Clip (double value, vtkDataArray * cellScalars,
119  vtkIncrementalPointLocator * locator, vtkCellArray * tetras,
120  vtkPointData * inPd, vtkPointData * outPd,
121  vtkCellData * inCd, vtkIdType cellId, vtkCellData * outCd, int insideOut);
123 
125 
127  int IntersectWithLine (double p1[3], double p2[3], double tol, double &t,
128  double x[3], double pcoords[3], int &subId);
130 
132 
134  static void InterpolationFunctions (double pcoords[3], double weights[27]);
135  // Description:
136  // @deprecated Replaced by vtkTriQuadraticHexahedron::InterpolateDerivs as of VTK 5.2
137  static void InterpolationDerivs (double pcoords[3], double derivs[81]);
138  // Description:
139  // Compute the interpolation functions/derivatives
140  // (aka shape functions/derivatives)
141  virtual void InterpolateFunctions (double pcoords[3], double weights[27])
142  {
144  }
145  virtual void InterpolateDerivs (double pcoords[3], double derivs[81])
146  {
148  }
149  // Description:
150  // Return the ids of the vertices defining edge/face (`edgeId`/`faceId').
151  // Ids are related to the cell, not to the dataset.
152  static int *GetEdgeArray(int edgeId);
153  static int *GetFaceArray(int faceId);
155 
159  void JacobianInverse (double pcoords[3], double **inverse, double derivs[81]);
160 
161 protected:
164 
169 
170 private:
171  vtkTriQuadraticHexahedron (const vtkTriQuadraticHexahedron &); // Not implemented.
172  void operator = (const vtkTriQuadraticHexahedron &); // Not implemented.
173 };
174 
175 #endif