VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "vtkCommonDataModelModule.h" // For export macro
41 #include "vtkCell3D.h"
42 
43 class vtkLine;
44 class vtkPolygon;
45 class vtkQuad;
46 class vtkTriangle;
47 
49 {
50 public:
51  static vtkPentagonalPrism *New();
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
56 
57  virtual void GetEdgePoints(int edgeId, int* &pts);
58  virtual void GetFacePoints(int faceId, int* &pts);
60 
62 
64  int GetCellDimension() {return 3;};
65  int GetNumberOfEdges() {return 15;};
66  int GetNumberOfFaces() {return 7;};
67  vtkCell *GetEdge(int edgeId);
68  vtkCell *GetFace(int faceId);
69  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
71 
72  int EvaluatePosition(double x[3], double* closestPoint,
73  int& subId, double pcoords[3],
74  double& dist2, double *weights);
75  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
76  double *weights);
77  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
78  double x[3], double pcoords[3], int& subId);
79  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
80  void Derivatives(int subId, double pcoords[3], double *values,
81  int dim, double *derivs);
82  double *GetParametricCoords();
83 
85  int GetParametricCenter(double pcoords[3]);
86 
89  static void InterpolationFunctions(double pcoords[3], double weights[10]);
92  static void InterpolationDerivs(double pcoords[3], double derivs[30]);
94 
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 
GLuint index
Definition: vtkgl.h:11983
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])
GLdouble GLdouble t
Definition: vtkgl.h:11602
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:37
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
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:58
int GetParametricCenter(double pcoords[3])
const GLbyte * weights
Definition: vtkgl.h:12766
a simple class to control print indentation
Definition: vtkIndent.h:38
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
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:39