VTK
vtkWedge.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWedge.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 vtkWedge_h
37 #define vtkWedge_h
38 
39 #include "vtkCommonDataModelModule.h" // For export macro
40 #include "vtkCell3D.h"
41 
42 class vtkLine;
43 class vtkTriangle;
44 class vtkQuad;
47 
49 {
50 public:
51  static vtkWedge *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_WEDGE;}
64  int GetCellDimension() {return 3;}
65  int GetNumberOfEdges() {return 9;}
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 
92  static void InterpolationFunctions(double pcoords[3], double weights[6]);
94  static void InterpolationDerivs(double pcoords[3], double derivs[18]);
96 
98  virtual void InterpolateFunctions(double pcoords[3], double weights[6])
99  {
101  }
102  virtual void InterpolateDerivs(double pcoords[3], double derivs[18])
103  {
104  vtkWedge::InterpolationDerivs(pcoords,derivs);
105  }
106  int JacobianInverse(double pcoords[3], double **inverse, double derivs[18]);
108 
110 
112  static int *GetEdgeArray(int edgeId);
113  static int *GetFaceArray(int faceId);
115 
116 protected:
119 
123 
124 private:
125  vtkWedge(const vtkWedge&); // Not implemented.
126  void operator=(const vtkWedge&); // Not implemented.
127 };
128 
129 inline int vtkWedge::GetParametricCenter(double pcoords[3])
130 {
131  pcoords[0] = pcoords[1] = 0.333333;
132  pcoords[2] = 0.5;
133  return 0;
134 }
135 
136 #endif
137 
138 
139 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkWedge::Line
vtkLine * Line
Definition: vtkWedge.h:120
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkWedge::GetEdgePoints
virtual void GetEdgePoints(int edgeId, int *&pts)
vtkWedge::GetEdge
vtkCell * GetEdge(int edgeId)
vtkWedge::GetNumberOfEdges
int GetNumberOfEdges()
Definition: vtkWedge.h:65
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkWedge::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkWedge::GetEdgeArray
static int * GetEdgeArray(int edgeId)
vtkWedge::New
static vtkWedge * New()
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkWedge::InterpolationDerivs
static void InterpolationDerivs(double pcoords[3], double derivs[18])
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkCell3D.h
vtkWedge::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double derivs[18])
Definition: vtkWedge.h:102
vtkWedge::GetCellType
int GetCellType()
Definition: vtkWedge.h:63
vtkLine
cell represents a 1D line
Definition: vtkLine.h:35
vtkWedge::GetFaceArray
static int * GetFaceArray(int faceId)
vtkWedge::InterpolationFunctions
static void InterpolationFunctions(double pcoords[3], double weights[6])
vtkCell3D
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:38
vtkWedge::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkWedge::GetFace
vtkCell * GetFace(int faceId)
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkWedge
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:49
vtkWedge::GetParametricCenter
int GetParametricCenter(double pcoords[3])
Definition: vtkWedge.h:129
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkWedge::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkWedge::Triangle
vtkTriangle * Triangle
Definition: vtkWedge.h:121
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
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
vtkWedge::GetParametricCoords
virtual double * GetParametricCoords()
vtkWedge::GetFacePoints
virtual void GetFacePoints(int faceId, int *&pts)
vtkWedge::GetCellDimension
int GetCellDimension()
Definition: vtkWedge.h:64
vtkTriangle
a cell that represents a triangle
Definition: vtkTriangle.h:41
vtkWedge::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkWedge::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
vtkWedge::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double weights[6])
Definition: vtkWedge.h:98
vtkWedge::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)
vtkWedge::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
vtkWedge::GetNumberOfFaces
int GetNumberOfFaces()
Definition: vtkWedge.h:66
vtkWedge::vtkWedge
vtkWedge()
vtkCell::GetParametricCenter
virtual int GetParametricCenter(double pcoords[3])
vtkWedge::Quad
vtkQuad * Quad
Definition: vtkWedge.h:122
VTK_WEDGE
@ VTK_WEDGE
Definition: vtkCellType.h:57
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:82
vtkWedge::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkWedge::~vtkWedge
~vtkWedge()
vtkWedge::JacobianInverse
int JacobianInverse(double pcoords[3], double **inverse, double derivs[18])
vtkQuad
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:41