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 
48 {
49 public:
50  static vtkPentagonalPrism *New();
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 
88  static void InterpolationFunctions(double pcoords[3], double weights[10]);
91  static void InterpolationDerivs(double pcoords[3], double derivs[30]);
93 
95  virtual void InterpolateFunctions(double pcoords[3], double weights[10])
96  {
98  }
99  virtual void InterpolateDerivs(double pcoords[3], double derivs[30])
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[30]);
116 
117 protected:
120 
125 
126 private:
127  vtkPentagonalPrism(const vtkPentagonalPrism&); // Not implemented.
128  void operator=(const vtkPentagonalPrism&); // Not implemented.
129 };
130 
131 //----------------------------------------------------------------------------
132 inline int vtkPentagonalPrism::GetParametricCenter(double pcoords[3])
133 {
134  pcoords[0] = pcoords[1] = 0.5;
135  pcoords[2] = 0.5;
136 
137  return 0;
138 }
139 #endif
140 
141