VTK
vtkGenericCell.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGenericCell.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 =========================================================================*/
35 #ifndef vtkGenericCell_h
36 #define vtkGenericCell_h
37 
38 #include "vtkCommonDataModelModule.h" // For export macro
39 #include "vtkCell.h"
40 
42 {
43 public:
45  static vtkGenericCell *New();
46 
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
53 
56  void SetPointIds(vtkIdList *pointIds);
57 
59 
61  void DeepCopy(vtkCell *c);
62  int GetCellType();
64  int IsLinear();
66  void Initialize();
68  void SetFaces(vtkIdType *faces);
72  vtkCell *GetEdge(int edgeId);
73  vtkCell *GetFace(int faceId);
74  int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
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],
79  double x[3], double *weights);
80  void Contour(double value, vtkDataArray *cellScalars,
82  vtkCellArray *lines, vtkCellArray *polys,
83  vtkPointData *inPd, vtkPointData *outPd,
84  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
85  void Clip(double value, vtkDataArray *cellScalars,
86  vtkIncrementalPointLocator *locator, vtkCellArray *connectivity,
87  vtkPointData *inPd, vtkPointData *outPd,
88  vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
89  int insideOut);
90  int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
91  double x[3], double pcoords[3], int& subId);
92  int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
93  void Derivatives(int subId, double pcoords[3], double *values,
94  int dim, double *derivs);
95  int GetParametricCenter(double pcoords[3]);
99 
101 
103  virtual void InterpolateFunctions(double pcoords[3], double *weights);
104  virtual void InterpolateDerivs(double pcoords[3], double *derivs);
106 
108 
114  void SetCellTypeToEmptyCell() {this->SetCellType(VTK_EMPTY_CELL);}
115  void SetCellTypeToVertex() {this->SetCellType(VTK_VERTEX);}
116  void SetCellTypeToPolyVertex() {this->SetCellType(VTK_POLY_VERTEX);}
117  void SetCellTypeToLine() {this->SetCellType(VTK_LINE);}
118  void SetCellTypeToPolyLine() {this->SetCellType(VTK_POLY_LINE);}
119  void SetCellTypeToTriangle() {this->SetCellType(VTK_TRIANGLE);}
120  void SetCellTypeToTriangleStrip() {this->SetCellType(VTK_TRIANGLE_STRIP);}
121  void SetCellTypeToPolygon() {this->SetCellType(VTK_POLYGON);}
122  void SetCellTypeToPixel() {this->SetCellType(VTK_PIXEL);}
123  void SetCellTypeToQuad() {this->SetCellType(VTK_QUAD);}
124  void SetCellTypeToTetra() {this->SetCellType(VTK_TETRA);}
125  void SetCellTypeToVoxel() {this->SetCellType(VTK_VOXEL);}
126  void SetCellTypeToHexahedron() {this->SetCellType(VTK_HEXAHEDRON);}
127  void SetCellTypeToWedge() {this->SetCellType(VTK_WEDGE);}
128  void SetCellTypeToPyramid() {this->SetCellType(VTK_PYRAMID);}
131  void SetCellTypeToPolyhedron() {this->SetCellType(VTK_POLYHEDRON);}
133  void SetCellTypeToQuadraticEdge() {this->SetCellType(VTK_QUADRATIC_EDGE);}
134  void SetCellTypeToCubicLine() {this->SetCellType(VTK_CUBIC_LINE);}
137  void SetCellTypeToQuadraticQuad() {this->SetCellType(VTK_QUADRATIC_QUAD);}
147  this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);}
149  this->SetCellType(VTK_TRIQUADRATIC_HEXAHEDRON);}
151  this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON);}
153 
156 
157 protected:
160 
162 
163 private:
164  vtkGenericCell(const vtkGenericCell&); // Not implemented.
165  void operator=(const vtkGenericCell&); // Not implemented.
166 };
167 
168 #endif
169 
170 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkGenericCell::GetParametricCenter
int GetParametricCenter(double pcoords[3])
vtkGenericCell::SetCellTypeToPolyLine
void SetCellTypeToPolyLine()
Definition: vtkGenericCell.h:118
vtkGenericCell::SetCellTypeToQuadraticEdge
void SetCellTypeToQuadraticEdge()
Definition: vtkGenericCell.h:133
VTK_QUADRATIC_QUAD
@ VTK_QUADRATIC_QUAD
Definition: vtkCellType.h:65
VTK_VOXEL
@ VTK_VOXEL
Definition: vtkCellType.h:55
vtkGenericCell::SetCellTypeToQuadraticTetra
void SetCellTypeToQuadraticTetra()
Definition: vtkGenericCell.h:139
VTK_TRIANGLE_STRIP
@ VTK_TRIANGLE_STRIP
Definition: vtkCellType.h:50
VTK_POLYHEDRON
@ VTK_POLYHEDRON
Definition: vtkCellType.h:86
vtkGenericCell::GetFace
vtkCell * GetFace(int faceId)
vtkGenericCell::ShallowCopy
void ShallowCopy(vtkCell *c)
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkGenericCell::SetCellTypeToQuadraticPyramid
void SetCellTypeToQuadraticPyramid()
Definition: vtkGenericCell.h:142
vtkGenericCell::SetCellTypeToPolyVertex
void SetCellTypeToPolyVertex()
Definition: vtkGenericCell.h:116
vtkGenericCell::SetCellTypeToQuadraticPolygon
void SetCellTypeToQuadraticPolygon()
Definition: vtkGenericCell.h:138
vtkGenericCell::CellBoundary
int CellBoundary(int subId, double pcoords[3], vtkIdList *pts)
vtkGenericCell::SetFaces
void SetFaces(vtkIdType *faces)
vtkGenericCell::SetCellTypeToQuadraticLinearQuad
void SetCellTypeToQuadraticLinearQuad()
Definition: vtkGenericCell.h:143
vtkGenericCell::Cell
vtkCell * Cell
Definition: vtkGenericCell.h:161
vtkGenericCell::Derivatives
void Derivatives(int subId, double pcoords[3], double *values, int dim, double *derivs)
VTK_QUADRATIC_LINEAR_WEDGE
@ VTK_QUADRATIC_LINEAR_WEDGE
Definition: vtkCellType.h:74
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:37
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkGenericCell::SetCellTypeToQuadraticQuad
void SetCellTypeToQuadraticQuad()
Definition: vtkGenericCell.h:137
VTK_LINE
@ VTK_LINE
Definition: vtkCellType.h:47
VTK_PIXEL
@ VTK_PIXEL
Definition: vtkCellType.h:52
vtkGenericCell::IsPrimaryCell
int IsPrimaryCell()
vtkGenericCell::SetCellTypeToVoxel
void SetCellTypeToVoxel()
Definition: vtkGenericCell.h:125
vtkGenericCell::GetNumberOfFaces
int GetNumberOfFaces()
vtkGenericCell::SetCellTypeToPolygon
void SetCellTypeToPolygon()
Definition: vtkGenericCell.h:121
vtkGenericCell::IntersectWithLine
int IntersectWithLine(double p1[3], double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)
vtkGenericCell::SetCellTypeToTriangleStrip
void SetCellTypeToTriangleStrip()
Definition: vtkGenericCell.h:120
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkGenericCell::vtkGenericCell
vtkGenericCell()
vtkGenericCell::GetCellType
int GetCellType()
vtkGenericCell::DeepCopy
void DeepCopy(vtkCell *c)
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkGenericCell::SetCellTypeToHexagonalPrism
void SetCellTypeToHexagonalPrism()
Definition: vtkGenericCell.h:130
vtkGenericCell::RequiresExplicitFaceRepresentation
int RequiresExplicitFaceRepresentation()
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
VTK_PYRAMID
@ VTK_PYRAMID
Definition: vtkCellType.h:58
VTK_QUADRATIC_TETRA
@ VTK_QUADRATIC_TETRA
Definition: vtkCellType.h:67
vtkGenericCell::GetFaces
vtkIdType * GetFaces()
vtkGenericCell::SetCellTypeToPolyhedron
void SetCellTypeToPolyhedron()
Definition: vtkGenericCell.h:131
vtkgl::points
GLsizei const GLfloat * points
Definition: vtkgl.h:14786
vtkGenericCell::SetCellTypeToCubicLine
void SetCellTypeToCubicLine()
Definition: vtkGenericCell.h:134
vtkGenericCell::SetCellTypeToTriQuadraticHexahedron
void SetCellTypeToTriQuadraticHexahedron()
Definition: vtkGenericCell.h:148
vtkGenericCell::SetCellTypeToConvexPointSet
void SetCellTypeToConvexPointSet()
Definition: vtkGenericCell.h:132
vtkGenericCell::InstantiateCell
static vtkCell * InstantiateCell(int cellType)
vtkGenericCell::EvaluateLocation
void EvaluateLocation(int &subId, double pcoords[3], double x[3], double *weights)
VTK_POLY_LINE
@ VTK_POLY_LINE
Definition: vtkCellType.h:48
vtkGenericCell::SetCellTypeToPixel
void SetCellTypeToPixel()
Definition: vtkGenericCell.h:122
vtkCell.h
VTK_QUADRATIC_PYRAMID
@ VTK_QUADRATIC_PYRAMID
Definition: vtkCellType.h:70
vtkGenericCell::SetCellTypeToQuadraticWedge
void SetCellTypeToQuadraticWedge()
Definition: vtkGenericCell.h:141
VTK_QUAD
@ VTK_QUAD
Definition: vtkCellType.h:53
vtkGenericCell::EvaluatePosition
int EvaluatePosition(double x[3], double *closestPoint, int &subId, double pcoords[3], double &dist2, double *weights)
vtkGenericCell::Initialize
void Initialize()
vtkGenericCell::SetCellTypeToWedge
void SetCellTypeToWedge()
Definition: vtkGenericCell.h:127
vtkGenericCell::SetCellTypeToPentagonalPrism
void SetCellTypeToPentagonalPrism()
Definition: vtkGenericCell.h:129
vtkGenericCell::SetCellTypeToTetra
void SetCellTypeToTetra()
Definition: vtkGenericCell.h:124
vtkGenericCell::IsLinear
int IsLinear()
vtkGenericCell::SetCellTypeToTriangle
void SetCellTypeToTriangle()
Definition: vtkGenericCell.h:119
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
VTK_QUADRATIC_LINEAR_QUAD
@ VTK_QUADRATIC_LINEAR_QUAD
Definition: vtkCellType.h:73
VTK_CONVEX_POINT_SET
@ VTK_CONVEX_POINT_SET
Definition: vtkCellType.h:83
vtkgl::c
const GLubyte * c
Definition: vtkgl.h:15720
VTK_EMPTY_CELL
@ VTK_EMPTY_CELL
Definition: vtkCellType.h:44
vtkGenericCell::SetCellTypeToHexahedron
void SetCellTypeToHexahedron()
Definition: vtkGenericCell.h:126
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
VTK_TRIQUADRATIC_HEXAHEDRON
@ VTK_TRIQUADRATIC_HEXAHEDRON
Definition: vtkCellType.h:72
vtkGenericCell::GetParametricCoords
double * GetParametricCoords()
vtkCell
abstract class to specify cell behavior
Definition: vtkCell.h:62
vtkGenericCell::SetCellTypeToBiQuadraticQuad
void SetCellTypeToBiQuadraticQuad()
Definition: vtkGenericCell.h:144
vtkGenericCell::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkGenericCell::SetCellTypeToLine
void SetCellTypeToLine()
Definition: vtkGenericCell.h:117
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:38
vtkGenericCell::SetPoints
void SetPoints(vtkPoints *points)
VTK_QUADRATIC_POLYGON
@ VTK_QUADRATIC_POLYGON
Definition: vtkCellType.h:66
vtkGenericCell::GetCellDimension
int GetCellDimension()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGenericCell::GetNumberOfEdges
int GetNumberOfEdges()
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
VTK_BIQUADRATIC_QUAD
@ VTK_BIQUADRATIC_QUAD
Definition: vtkCellType.h:71
vtkGenericCell::SetCellTypeToBiQuadraticTriangle
void SetCellTypeToBiQuadraticTriangle()
Definition: vtkGenericCell.h:136
VTK_POLY_VERTEX
@ VTK_POLY_VERTEX
Definition: vtkCellType.h:46
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
vtkGenericCell::RequiresInitialization
int RequiresInitialization()
VTK_HEXAHEDRON
@ VTK_HEXAHEDRON
Definition: vtkCellType.h:56
VTK_TETRA
@ VTK_TETRA
Definition: vtkCellType.h:54
vtkGenericCell::SetCellType
void SetCellType(int cellType)
VTK_QUADRATIC_TRIANGLE
@ VTK_QUADRATIC_TRIANGLE
Definition: vtkCellType.h:64
VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON
@ VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON
Definition: vtkCellType.h:76
vtkDax::detail::cellType
CellTypeInDataSet cellType(vtkDataSet *input)
Definition: vtkDaxDetailCommon.h:36
VTK_QUADRATIC_EDGE
@ VTK_QUADRATIC_EDGE
Definition: vtkCellType.h:63
vtkGenericCell::SetCellTypeToQuadraticLinearWedge
void SetCellTypeToQuadraticLinearWedge()
Definition: vtkGenericCell.h:145
vtkGenericCell::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)
VTK_PENTAGONAL_PRISM
@ VTK_PENTAGONAL_PRISM
Definition: vtkCellType.h:59
vtkGenericCell::New
static vtkGenericCell * New()
VTK_QUADRATIC_WEDGE
@ VTK_QUADRATIC_WEDGE
Definition: vtkCellType.h:69
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkgl::t
GLdouble GLdouble t
Definition: vtkgl.h:11602
vtkGenericCell::SetCellTypeToQuad
void SetCellTypeToQuad()
Definition: vtkGenericCell.h:123
vtkGenericCell::SetPointIds
void SetPointIds(vtkIdList *pointIds)
VTK_CUBIC_LINE
@ VTK_CUBIC_LINE
Definition: vtkCellType.h:80
vtkGenericCell::SetCellTypeToEmptyCell
void SetCellTypeToEmptyCell()
Definition: vtkGenericCell.h:114
VTK_POLYGON
@ VTK_POLYGON
Definition: vtkCellType.h:51
vtkGenericCell::SetCellTypeToVertex
void SetCellTypeToVertex()
Definition: vtkGenericCell.h:115
vtkGenericCell
provides thread-safe access to cells
Definition: vtkGenericCell.h:42
vtkGenericCell::SetCellTypeToBiQuadraticQuadraticWedge
void SetCellTypeToBiQuadraticQuadraticWedge()
Definition: vtkGenericCell.h:146
vtkGenericCell::InterpolateFunctions
virtual void InterpolateFunctions(double pcoords[3], double *weights)
vtkGenericCell::SetCellTypeToQuadraticTriangle
void SetCellTypeToQuadraticTriangle()
Definition: vtkGenericCell.h:135
VTK_WEDGE
@ VTK_WEDGE
Definition: vtkCellType.h:57
VTK_QUADRATIC_HEXAHEDRON
@ VTK_QUADRATIC_HEXAHEDRON
Definition: vtkCellType.h:68
vtkGenericCell::Triangulate
int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts)
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
VTK_BIQUADRATIC_QUADRATIC_WEDGE
@ VTK_BIQUADRATIC_QUADRATIC_WEDGE
Definition: vtkCellType.h:75
vtkGenericCell::Clip
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut)
vtkGenericCell::InterpolateDerivs
virtual void InterpolateDerivs(double pcoords[3], double *derivs)
vtkGenericCell::GetEdge
vtkCell * GetEdge(int edgeId)
vtkGenericCell::SetCellTypeToBiQuadraticQuadraticHexahedron
void SetCellTypeToBiQuadraticQuadraticHexahedron()
Definition: vtkGenericCell.h:150
VTK_VERTEX
@ VTK_VERTEX
Definition: vtkCellType.h:45
VTK_TRIANGLE
@ VTK_TRIANGLE
Definition: vtkCellType.h:49
vtkGenericCell::SetCellTypeToQuadraticHexahedron
void SetCellTypeToQuadraticHexahedron()
Definition: vtkGenericCell.h:140
vtkGenericCell::SetCellTypeToPyramid
void SetCellTypeToPyramid()
Definition: vtkGenericCell.h:128
VTK_HEXAGONAL_PRISM
@ VTK_HEXAGONAL_PRISM
Definition: vtkCellType.h:60
vtkGenericCell::~vtkGenericCell
~vtkGenericCell()
VTK_BIQUADRATIC_TRIANGLE
@ VTK_BIQUADRATIC_TRIANGLE
Definition: vtkCellType.h:77