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();
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:
120 
123 
124 private:
125  vtkHexahedron(const vtkHexahedron&); // Not implemented.
126  void operator=(const vtkHexahedron&); // Not implemented.
127 };
128 
129 #endif
130 
131 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkHexahedron::InterpolationDerivs
static void InterpolationDerivs(double pcoords[3], double derivs[24])
vtkHexahedron::GetEdgePoints
virtual void GetEdgePoints(int edgeId, int *&pts)
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkHexahedron::GetFacePoints
virtual void GetFacePoints(int faceId, int *&pts)
vtkHexahedron::vtkHexahedron
vtkHexahedron()
vtkHexahedron
a cell that represents a linear 3D hexahedron
Definition: vtkHexahedron.h:47
vtkHexahedron::GetEdgeArray
static int * GetEdgeArray(int edgeId)
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkHexahedron::JacobianInverse
void JacobianInverse(double pcoords[3], double **inverse, double derivs[24])
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkHexahedron::Line
vtkLine * Line
Definition: vtkHexahedron.h:121
vtkHexahedron::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double derivs[24])
Definition: vtkHexahedron.h:99
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkHexahedron::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkHexahedron::GetFace
vtkCell * GetFace(int faceId)
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkCell3D.h
vtkHexahedron::New
static vtkHexahedron * New()
vtkHexahedron::GetParametricCoords
virtual double * GetParametricCoords()
vtkHexahedron::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
vtkLine
cell represents a 1D line
Definition: vtkLine.h:35
vtkCell3D
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:38
vtkHexahedron::~vtkHexahedron
~vtkHexahedron()
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkHexahedron::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkHexahedron::Quad
vtkQuad * Quad
Definition: vtkHexahedron.h:122
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkHexahedron::GetNumberOfEdges
int GetNumberOfEdges()
Definition: vtkHexahedron.h:62
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:54
vtkHexahedron::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
VTK_HEXAHEDRON
@ VTK_HEXAHEDRON
Definition: vtkCellType.h:56
vtkHexahedron::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double weights[8])
Definition: vtkHexahedron.h:95
vtkHexahedron::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkHexahedron::Contour
void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)
vtkHexahedron::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
vtkHexahedron::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
vtkHexahedron::GetFaceArray
static int * GetFaceArray(int faceId)
vtkHexahedron::GetCellType
int GetCellType()
Definition: vtkHexahedron.h:61
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkHexahedron::GetEdge
vtkCell * GetEdge(int edgeId)
vtkHexahedron::GetNumberOfFaces
int GetNumberOfFaces()
Definition: vtkHexahedron.h:63
vtkHexahedron::InterpolationFunctions
static void InterpolationFunctions(double pcoords[3], double weights[8])
vtkQuad
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:41