VTK
vtkPyramid.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPyramid.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 =========================================================================*/
36 #ifndef vtkPyramid_h
37 #define vtkPyramid_h
38 
39 #include "vtkCommonDataModelModule.h" // For export macro
40 #include "vtkCell3D.h"
41 
42 class vtkLine;
43 class vtkQuad;
44 class vtkTriangle;
47 
49 {
50 public:
51  static vtkPyramid *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 
63  int GetCellType() {return VTK_PYRAMID;}
64  int GetCellDimension() {return 3;}
65  int GetNumberOfEdges() {return 8;}
66  int GetNumberOfFaces() {return 5;}
67  vtkCell *GetEdge(int edgeId);
68  vtkCell *GetFace(int faceId);
69  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
70  void Contour(double value, vtkDataArray *cellScalars,
72  vtkCellArray *lines, vtkCellArray *polys,
73  vtkPointData *inPd, vtkPointData *outPd,
74  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
75  int EvaluatePosition(double x[3], double* closestPoint,
76  int& subId, double pcoords[3],
77  double& dist2, double *weights);
78  void EvaluateLocation(int& subId, double pcoords[3], double x[3],
79  double *weights);
80  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
81  double x[3], double pcoords[3], int& subId);
82  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
83  void Derivatives(int subId, double pcoords[3], double *values,
84  int dim, double *derivs);
85  virtual double *GetParametricCoords();
87 
89  int GetParametricCenter(double pcoords[3]);
90 
93  static void InterpolationFunctions(double pcoords[3], double weights[5]);
95  static void InterpolationDerivs(double pcoords[3], double derivs[15]);
97 
99  virtual void InterpolateFunctions(double pcoords[3], double weights[5])
100  {
102  }
103  virtual void InterpolateDerivs(double pcoords[3], double derivs[15])
104  {
105  vtkPyramid::InterpolationDerivs(pcoords,derivs);
106  }
108 
109  int JacobianInverse(double pcoords[3], double **inverse, double derivs[15]);
110 
112 
114  static int *GetEdgeArray(int edgeId);
115  static int *GetFaceArray(int faceId);
117 
118 protected:
121 
125 
126 private:
127  vtkPyramid(const vtkPyramid&); // Not implemented.
128  void operator=(const vtkPyramid&); // Not implemented.
129 };
130 
131 //----------------------------------------------------------------------------
132 inline int vtkPyramid::GetParametricCenter(double pcoords[3])
133 {
134  pcoords[0] = pcoords[1] = 0.4;
135  pcoords[2] = 0.2;
136  return 0;
137 }
138 
139 #endif
140 
141 
142 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkPyramid::GetEdge
vtkCell * GetEdge(int edgeId)
vtkPyramid::GetCellDimension
int GetCellDimension()
Definition: vtkPyramid.h:64
vtkPyramid::GetNumberOfFaces
int GetNumberOfFaces()
Definition: vtkPyramid.h:66
vtkPyramid::GetFaceArray
static int * GetFaceArray(int faceId)
vtkPyramid::Line
vtkLine * Line
Definition: vtkPyramid.h:122
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkPyramid::GetParametricCenter
int GetParametricCenter(double pcoords[3])
Definition: vtkPyramid.h:132
vtkPyramid::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkPyramid::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkPyramid::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
vtkPyramid::InterpolationFunctions
static void InterpolationFunctions(double pcoords[3], double weights[5])
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkPyramid::Contour
void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd)
vtkPyramid::GetCellType
int GetCellType()
Definition: vtkPyramid.h:63
vtkPyramid::New
static vtkPyramid * New()
vtkPyramid::GetEdgeArray
static int * GetEdgeArray(int edgeId)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkPyramid::GetEdgePoints
virtual void GetEdgePoints(int edgeId, int *&pts)
vtkPyramid
a 3D cell that represents a linear pyramid
Definition: vtkPyramid.h:49
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
VTK_PYRAMID
@ VTK_PYRAMID
Definition: vtkCellType.h:58
vtkPyramid::JacobianInverse
int JacobianInverse(double pcoords[3], double **inverse, double derivs[15])
vtkCell3D.h
vtkLine
cell represents a 1D line
Definition: vtkLine.h:35
vtkPyramid::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkPyramid::vtkPyramid
vtkPyramid()
vtkPyramid::Triangle
vtkTriangle * Triangle
Definition: vtkPyramid.h:123
vtkPyramid::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkCell3D
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:38
vtkPyramid::GetNumberOfEdges
int GetNumberOfEdges()
Definition: vtkPyramid.h:65
vtkPyramid::Quad
vtkQuad * Quad
Definition: vtkPyramid.h:124
vtkPyramid::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double derivs[15])
Definition: vtkPyramid.h:103
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkPyramid::GetFace
vtkCell * GetFace(int faceId)
vtkPyramid::GetParametricCoords
virtual double * GetParametricCoords()
vtkPyramid::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double weights[5])
Definition: vtkPyramid.h:99
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:54
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkTriangle
a cell that represents a triangle
Definition: vtkTriangle.h:41
vtkPyramid::~vtkPyramid
~vtkPyramid()
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkCell::GetParametricCenter
virtual int GetParametricCenter(double pcoords[3])
vtkPyramid::GetFacePoints
virtual void GetFacePoints(int faceId, int *&pts)
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:82
vtkPyramid::InterpolationDerivs
static void InterpolationDerivs(double pcoords[3], double derivs[15])
vtkPyramid::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
vtkQuad
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:41
vtkPyramid::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)