VTK
vtkPentagonalPrism.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPentagonalPrism.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 =========================================================================*/
44 #ifndef vtkPentagonalPrism_h
45 #define vtkPentagonalPrism_h
46 
47 #include "vtkCommonDataModelModule.h" // For export macro
48 #include "vtkCell3D.h"
49 
50 class vtkLine;
51 class vtkPolygon;
52 class vtkQuad;
53 class vtkTriangle;
54 
56 {
57 public:
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
63 
64  virtual void GetEdgePoints(int edgeId, int* &pts);
65  virtual void GetFacePoints(int faceId, int* &pts);
67 
69 
71  int GetCellDimension() {return 3;};
72  int GetNumberOfEdges() {return 15;};
73  int GetNumberOfFaces() {return 7;};
74  vtkCell *GetEdge(int edgeId);
75  vtkCell *GetFace(int faceId);
76  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
78 
79  int EvaluatePosition(double x[3], double* closestPoint,
80  int& subId, double pcoords[3],
81  double& dist2, double *weights);
82  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
83  double *weights);
84  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
85  double x[3], double pcoords[3], int& subId);
86  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
87  void Derivatives(int subId, double pcoords[3], double *values,
88  int dim, double *derivs);
90 
92  int GetParametricCenter(double pcoords[3]);
93 
96  static void InterpolationFunctions(double pcoords[3], double weights[10]);
99  static void InterpolationDerivs(double pcoords[3], double derivs[30]);
101 
103  virtual void InterpolateFunctions(double pcoords[3], double weights[10])
104  {
106  }
107  virtual void InterpolateDerivs(double pcoords[3], double derivs[30])
108  {
110  }
112 
114 
116  static int *GetEdgeArray(int edgeId);
117  static int *GetFaceArray(int faceId);
119 
123  void JacobianInverse(double pcoords[3], double **inverse, double derivs[30]);
124 
125 protected:
128 
133 
134 private:
135  vtkPentagonalPrism(const vtkPentagonalPrism&); // Not implemented.
136  void operator=(const vtkPentagonalPrism&); // Not implemented.
137 };
138 
139 //----------------------------------------------------------------------------
140 inline int vtkPentagonalPrism::GetParametricCenter(double pcoords[3])
141 {
142  pcoords[0] = pcoords[1] = 0.5;
143  pcoords[2] = 0.5;
144 
145  return 0;
146 }
147 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkPentagonalPrism::GetFace
vtkCell * GetFace(int faceId)
vtkPentagonalPrism::InterpolationDerivs
static void InterpolationDerivs(double pcoords[3], double derivs[30])
vtkPentagonalPrism::GetNumberOfFaces
int GetNumberOfFaces()
Definition: vtkPentagonalPrism.h:73
vtkPentagonalPrism::GetCellType
int GetCellType()
Definition: vtkPentagonalPrism.h:70
vtkCommonDataModelModule.h
vtkPolygon
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:45
vtkPentagonalPrism::Triangle
vtkTriangle * Triangle
Definition: vtkPentagonalPrism.h:132
vtkPentagonalPrism::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkPentagonalPrism::~vtkPentagonalPrism
~vtkPentagonalPrism()
vtkPentagonalPrism::GetEdgeArray
static int * GetEdgeArray(int edgeId)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkPentagonalPrism::Line
vtkLine * Line
Definition: vtkPentagonalPrism.h:129
vtkPentagonalPrism::GetParametricCenter
int GetParametricCenter(double pcoords[3])
Definition: vtkPentagonalPrism.h:140
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkCell3D.h
vtkPentagonalPrism::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
vtkPentagonalPrism::GetEdge
vtkCell * GetEdge(int edgeId)
vtkLine
cell represents a 1D line
Definition: vtkLine.h:35
vtkPentagonalPrism::vtkPentagonalPrism
vtkPentagonalPrism()
vtkPentagonalPrism::Polygon
vtkPolygon * Polygon
Definition: vtkPentagonalPrism.h:131
vtkPentagonalPrism::GetCellDimension
int GetCellDimension()
Definition: vtkPentagonalPrism.h:71
vtkCell3D
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:38
vtkPentagonalPrism::JacobianInverse
void JacobianInverse(double pcoords[3], double **inverse, double derivs[30])
vtkPentagonalPrism
a 3D cell that represents a prism with pentagonal base
Definition: vtkPentagonalPrism.h:56
vtkPentagonalPrism::GetFaceArray
static int * GetFaceArray(int faceId)
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkPentagonalPrism::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double derivs[30])
Definition: vtkPentagonalPrism.h:107
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkTriangle
a cell that represents a triangle
Definition: vtkTriangle.h:41
vtkPentagonalPrism::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
VTK_PENTAGONAL_PRISM
@ VTK_PENTAGONAL_PRISM
Definition: vtkCellType.h:59
vtkPentagonalPrism::GetFacePoints
virtual void GetFacePoints(int faceId, int *&pts)
vtkPentagonalPrism::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
vtkPentagonalPrism::GetParametricCoords
double * GetParametricCoords()
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkPentagonalPrism::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkPentagonalPrism::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double weights[10])
Definition: vtkPentagonalPrism.h:103
vtkPentagonalPrism::InterpolationFunctions
static void InterpolationFunctions(double pcoords[3], double weights[10])
vtkPentagonalPrism::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkPentagonalPrism::Quad
vtkQuad * Quad
Definition: vtkPentagonalPrism.h:130
vtkPentagonalPrism::GetNumberOfEdges
int GetNumberOfEdges()
Definition: vtkPentagonalPrism.h:72
vtkCell::GetParametricCenter
virtual int GetParametricCenter(double pcoords[3])
vtkPentagonalPrism::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkPentagonalPrism::New
static vtkPentagonalPrism * New()
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkPentagonalPrism::GetEdgePoints
virtual void GetEdgePoints(int edgeId, int *&pts)
vtkQuad
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:41