VTK
vtkHexahedron.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHexahedron.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 =========================================================================*/
36 #ifndef __vtkHexahedron_h
37 #define __vtkHexahedron_h
38 
39 #include "vtkCell3D.h"
40 
41 class vtkLine;
42 class vtkQuad;
43 class vtkIncrementalPointLocator;
44 
45 class VTK_FILTERING_EXPORT vtkHexahedron : public vtkCell3D
46 {
47 public:
48  static vtkHexahedron *New();
49  vtkTypeMacro(vtkHexahedron,vtkCell3D);
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
54  virtual void GetEdgePoints(int edgeId, int* &pts);
55  virtual void GetFacePoints(int faceId, int* &pts);
57 
59 
60  int GetCellType() {return VTK_HEXAHEDRON;}
61  int GetNumberOfEdges() {return 12;}
62  int GetNumberOfFaces() {return 6;}
63  vtkCell *GetEdge(int edgeId);
64  vtkCell *GetFace(int faceId);
65  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
66  void Contour(double value, vtkDataArray *cellScalars,
67  vtkIncrementalPointLocator *locator, vtkCellArray *verts,
68  vtkCellArray *lines, vtkCellArray *polys,
69  vtkPointData *inPd, vtkPointData *outPd,
70  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
72 
73  int EvaluatePosition(double x[3], double* closestPoint,
74  int& subId, double pcoords[3],
75  double& dist2, double *weights);
76  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
77  double *weights);
78  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
79  double x[3], double pcoords[3], int& subId);
80  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
81  void Derivatives(int subId, double pcoords[3], double *values,
82  int dim, double *derivs);
83  virtual double *GetParametricCoords();
84 
86 
88  static void InterpolationFunctions(double pcoords[3], double weights[8]);
89  // Description:
90  // @deprecated Replaced by vtkHexahedron::InterpolateDerivs as of VTK 5.2
91  static void InterpolationDerivs(double pcoords[3], double derivs[24]);
92  // Description:
93  // Compute the interpolation functions/derivatives
94  // (aka shape functions/derivatives)
95  virtual void InterpolateFunctions(double pcoords[3], double weights[8])
96  {
98  }
99  virtual void InterpolateDerivs(double pcoords[3], double derivs[24])
100  {
101  vtkHexahedron::InterpolationDerivs(pcoords,derivs);
102  }
104 
106 
108  static int *GetEdgeArray(int edgeId);
109  static int *GetFaceArray(int faceId);
111 
115  void JacobianInverse(double pcoords[3], double **inverse, double derivs[24]);
116 
117 protected:
118  vtkHexahedron();
119  ~vtkHexahedron();
120 
123 
124 private:
125  vtkHexahedron(const vtkHexahedron&); // Not implemented.
126  void operator=(const vtkHexahedron&); // Not implemented.
127 };
128 
129 #endif
130 
131 
int GetNumberOfFaces()
Definition: vtkHexahedron.h:62
represent and manipulate point attribute data
Definition: vtkPointData.h:35
vtkLine * Line
vtkQuad * Quad
#define VTK_FILTERING_EXPORT
virtual void InterpolateFunctions(double pcoords[3], double weights[8])
Definition: vtkHexahedron.h:95
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:39
int vtkIdType
Definition: vtkType.h:255
cell represents a 1D line
Definition: vtkLine.h:33
static void InterpolationFunctions(double pcoords[3], double weights[8])
int GetNumberOfEdges()
Definition: vtkHexahedron.h:61
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
a cell that represents a linear 3D hexahedron
Definition: vtkHexahedron.h:45
object to represent cell connectivity
Definition: vtkCellArray.h:48
virtual void InterpolateDerivs(double pcoords[3], double derivs[24])
Definition: vtkHexahedron.h:99
static void InterpolationDerivs(double pcoords[3], double derivs[24])
represent and manipulate 3D points
Definition: vtkPoints.h:38