VTK
vtkHexagonalPrism.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkHexagonalPrism.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 =========================================================================*/
37 #ifndef vtkHexagonalPrism_h
38 #define vtkHexagonalPrism_h
39 
40 #include "vtkCommonDataModelModule.h" // For export macro
41 #include "vtkCell3D.h"
42 
43 class vtkLine;
44 class vtkPolygon;
45 class vtkQuad;
46 
48 {
49 public:
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
55 
56  virtual void GetEdgePoints(int edgeId, int* &pts);
57  virtual void GetFacePoints(int faceId, int* &pts);
59 
61 
63  int GetCellDimension() {return 3;};
64  int GetNumberOfEdges() {return 18;};
65  int GetNumberOfFaces() {return 8;};
66  vtkCell *GetEdge(int edgeId);
67  vtkCell *GetFace(int faceId);
68  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
70 
71  int EvaluatePosition(double x[3], double* closestPoint,
72  int& subId, double pcoords[3],
73  double& dist2, double *weights);
74  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
75  double *weights);
76  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
77  double x[3], double pcoords[3], int& subId);
78  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
79  void Derivatives(int subId, double pcoords[3], double *values,
80  int dim, double *derivs);
82 
84  int GetParametricCenter(double pcoords[3]);
85 
88  static void InterpolationFunctions(double pcoords[3], double weights[12]);
91  static void InterpolationDerivs(double pcoords[3], double derivs[36]);
93 
95  virtual void InterpolateFunctions(double pcoords[3], double weights[12])
96  {
98  }
99  virtual void InterpolateDerivs(double pcoords[3], double derivs[36])
100  {
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[36]);
116 
117 protected:
120 
124 
125 private:
126  vtkHexagonalPrism(const vtkHexagonalPrism&); // Not implemented.
127  void operator=(const vtkHexagonalPrism&); // Not implemented.
128 };
129 
130 //----------------------------------------------------------------------------
131 inline int vtkHexagonalPrism::GetParametricCenter(double pcoords[3])
132 {
133  pcoords[0] = pcoords[1] = 0.5;
134  pcoords[2] = 0.5;
135  return 0;
136 }
137 #endif
138 
139 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkHexagonalPrism::GetEdge
vtkCell * GetEdge(int edgeId)
vtkHexagonalPrism::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double derivs[36])
Definition: vtkHexagonalPrism.h:99
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkHexagonalPrism
a 3D cell that represents a prism with hexagonal base
Definition: vtkHexagonalPrism.h:48
vtkCommonDataModelModule.h
vtkPolygon
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:45
vtkHexagonalPrism::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkHexagonalPrism::GetEdgeArray
static int * GetEdgeArray(int edgeId)
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkCell3D.h
vtkHexagonalPrism::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
vtkLine
cell represents a 1D line
Definition: vtkLine.h:35
vtkHexagonalPrism::GetFaceArray
static int * GetFaceArray(int faceId)
vtkCell3D
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:38
vtkHexagonalPrism::Quad
vtkQuad * Quad
Definition: vtkHexagonalPrism.h:122
vtkHexagonalPrism::GetFacePoints
virtual void GetFacePoints(int faceId, int *&pts)
vtkHexagonalPrism::New
static vtkHexagonalPrism * New()
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkHexagonalPrism::GetNumberOfEdges
int GetNumberOfEdges()
Definition: vtkHexagonalPrism.h:64
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkHexagonalPrism::GetEdgePoints
virtual void GetEdgePoints(int edgeId, int *&pts)
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkHexagonalPrism::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double weights[12])
Definition: vtkHexagonalPrism.h:95
vtkHexagonalPrism::JacobianInverse
void JacobianInverse(double pcoords[3], double **inverse, double derivs[36])
vtkHexagonalPrism::vtkHexagonalPrism
vtkHexagonalPrism()
vtkHexagonalPrism::GetCellType
int GetCellType()
Definition: vtkHexagonalPrism.h:62
vtkHexagonalPrism::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkHexagonalPrism::GetNumberOfFaces
int GetNumberOfFaces()
Definition: vtkHexagonalPrism.h:65
vtkHexagonalPrism::GetParametricCenter
int GetParametricCenter(double pcoords[3])
Definition: vtkHexagonalPrism.h:131
vtkCell::GetParametricCenter
virtual int GetParametricCenter(double pcoords[3])
vtkHexagonalPrism::GetFace
vtkCell * GetFace(int faceId)
vtkHexagonalPrism::GetCellDimension
int GetCellDimension()
Definition: vtkHexagonalPrism.h:63
vtkHexagonalPrism::Polygon
vtkPolygon * Polygon
Definition: vtkHexagonalPrism.h:123
vtkHexagonalPrism::GetParametricCoords
double * GetParametricCoords()
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkHexagonalPrism::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkHexagonalPrism::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkHexagonalPrism::~vtkHexagonalPrism
~vtkHexagonalPrism()
vtkHexagonalPrism::InterpolationFunctions
static void InterpolationFunctions(double pcoords[3], double weights[12])
vtkQuad
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:41
vtkHexagonalPrism::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
VTK_HEXAGONAL_PRISM
@ VTK_HEXAGONAL_PRISM
Definition: vtkCellType.h:60
vtkHexagonalPrism::InterpolationDerivs
static void InterpolationDerivs(double pcoords[3], double derivs[36])
vtkHexagonalPrism::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
vtkHexagonalPrism::Line
vtkLine * Line
Definition: vtkHexagonalPrism.h:121