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 =========================================================================*/
37 #ifndef __vtkPentagonalPrism_h
38 #define __vtkPentagonalPrism_h
39 
40 #include "vtkCell3D.h"
41 
42 class vtkLine;
43 class vtkPolygon;
44 class vtkQuad;
45 class vtkTriangle;
46 
47 class VTK_FILTERING_EXPORT vtkPentagonalPrism : public vtkCell3D
48 {
49 public:
50  static vtkPentagonalPrism *New();
51  vtkTypeMacro(vtkPentagonalPrism,vtkCell3D);
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 15;};
65  int GetNumberOfFaces() {return 7;};
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);
81  double *GetParametricCoords();
82 
84  int GetParametricCenter(double pcoords[3]);
85 
87 
89  static void InterpolationFunctions(double pcoords[3], double weights[10]);
90  // Description:
91  // @deprecated Replaced by vtkPentagonalPrism::InterpolateDerivs as of VTK 5.2
92  static void InterpolationDerivs(double pcoords[3], double derivs[30]);
93  // Description:
94  // Compute the interpolation functions/derivatives
95  // (aka shape functions/derivatives)
96  virtual void InterpolateFunctions(double pcoords[3], double weights[10])
97  {
99  }
100  virtual void InterpolateDerivs(double pcoords[3], double derivs[30])
101  {
103  }
105 
107 
109  static int *GetEdgeArray(int edgeId);
110  static int *GetFaceArray(int faceId);
112 
116  void JacobianInverse(double pcoords[3], double **inverse, double derivs[30]);
117 
118 protected:
121 
126 
127 private:
128  vtkPentagonalPrism(const vtkPentagonalPrism&); // Not implemented.
129  void operator=(const vtkPentagonalPrism&); // Not implemented.
130 };
131 
132 //----------------------------------------------------------------------------
133 inline int vtkPentagonalPrism::GetParametricCenter(double pcoords[3])
134 {
135  pcoords[0] = pcoords[1] = 0.5;
136  pcoords[2] = 0.5;
137 
138  return 0;
139 }
140 #endif
141 
142 
#define VTK_FILTERING_EXPORT
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:39
static void InterpolationDerivs(double pcoords[3], double derivs[30])
virtual void InterpolateDerivs(double pcoords[3], double derivs[30])
a 3D cell that represents a prism with pentagonal base
cell represents a 1D line
Definition: vtkLine.h:33
int GetParametricCenter(double pcoords[3])
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:43
static void InterpolationFunctions(double pcoords[3], double weights[10])
a cell that represents a triangle
Definition: vtkTriangle.h:39
virtual void InterpolateFunctions(double pcoords[3], double weights[10])
represent and manipulate 3D points
Definition: vtkPoints.h:38