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:
58  static vtkPentagonalPrism *New();
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);
89  double *GetParametricCoords();
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
virtual double * GetParametricCoords()
virtual int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)=0
virtual void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)=0
virtual int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)=0
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:40
static void InterpolationDerivs(double pcoords[3], double derivs[30])
virtual void InterpolateDerivs(double pcoords[3], double derivs[30])
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:37
a 3D cell that represents a prism with pentagonal base
cell represents a 1D line
Definition: vtkLine.h:34
abstract class to specify cell behavior
Definition: vtkCell.h:61
int GetParametricCenter(double pcoords[3])
a simple class to control print indentation
Definition: vtkIndent.h:38
list of point or cell ids
Definition: vtkIdList.h:35
virtual void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)=0
virtual int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)=0
virtual void GetFacePoints(int faceId, int *&pts)=0
void PrintSelf(ostream &os, vtkIndent indent)
a cell that represents an n-sided polygon
Definition: vtkPolygon.h:44
static void InterpolationFunctions(double pcoords[3], double weights[10])
virtual vtkCell * GetFace(int faceId)=0
virtual vtkCell * GetEdge(int edgeId)=0
a cell that represents a triangle
Definition: vtkTriangle.h:40
virtual int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)=0
static vtkObject * New()
virtual int GetParametricCenter(double pcoords[3])
virtual void InterpolateFunctions(double pcoords[3], double weights[10])
virtual void GetEdgePoints(int edgeId, int *&pts)=0
#define VTKCOMMONDATAMODEL_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38