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 "vtkCommonDataModelModule.h" // For export macro
40 #include "vtkCell3D.h"
41 
42 class vtkLine;
43 class vtkQuad;
45 
47 {
48 public:
49  static vtkHexahedron *New();
50  vtkTypeMacro(vtkHexahedron,vtkCell3D);
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54 
55  virtual void GetEdgePoints(int edgeId, int* &pts);
56  virtual void GetFacePoints(int faceId, int* &pts);
58 
60 
61  int GetCellType() {return VTK_HEXAHEDRON;}
62  int GetNumberOfEdges() {return 12;}
63  int GetNumberOfFaces() {return 6;}
64  vtkCell *GetEdge(int edgeId);
65  vtkCell *GetFace(int faceId);
66  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
67  void Contour(double value, vtkDataArray *cellScalars,
69  vtkCellArray *lines, vtkCellArray *polys,
70  vtkPointData *inPd, vtkPointData *outPd,
71  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
73 
74  int EvaluatePosition(double x[3], double* closestPoint,
75  int& subId, double pcoords[3],
76  double& dist2, double *weights);
77  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
78  double *weights);
79  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
80  double x[3], double pcoords[3], int& subId);
81  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
82  void Derivatives(int subId, double pcoords[3], double *values,
83  int dim, double *derivs);
84  virtual double *GetParametricCoords();
85 
88  static void InterpolationFunctions(double pcoords[3], double weights[8]);
91  static void InterpolationDerivs(double pcoords[3], double derivs[24]);
93 
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:63
represent and manipulate point attribute data
Definition: vtkPointData.h:36
vtkLine * Line
vtkQuad * Quad
virtual double * GetParametricCoords()
virtual void InterpolateFunctions(double pcoords[3], double weights[8])
Definition: vtkHexahedron.h:95
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
Abstract class in support of both point location and point insertion.
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)=0
virtual void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)=0
virtual int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)=0
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:40
int vtkIdType
Definition: vtkType.h:275
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:37
cell represents a 1D line
Definition: vtkLine.h:34
abstract class to specify cell behavior
Definition: vtkCell.h:61
static void InterpolationFunctions(double pcoords[3], double weights[8])
virtual void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)
int GetNumberOfEdges()
Definition: vtkHexahedron.h:62
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
virtual void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)=0
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)=0
virtual void GetFacePoints(int faceId, int *&pts)=0
void PrintSelf(ostream &os, vtkIndent indent)
a cell that represents a linear 3D hexahedron
Definition: vtkHexahedron.h:46
virtual vtkCell * GetFace(int faceId)=0
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual vtkCell * GetEdge(int edgeId)=0
virtual void InterpolateDerivs(double pcoords[3], double derivs[24])
Definition: vtkHexahedron.h:99
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
virtual void GetEdgePoints(int edgeId, int *&pts)=0
static void InterpolationDerivs(double pcoords[3], double derivs[24])
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38