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=========================================================================*/
33#ifndef vtkGenericCell_h
34#define vtkGenericCell_h
35
36#include "vtkCommonDataModelModule.h" // For export macro
37#include "vtkCell.h"
38
39class VTKCOMMONDATAMODEL_EXPORT vtkGenericCell : public vtkCell
40{
41public:
46
47 vtkTypeMacro(vtkGenericCell,vtkCell);
48 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
49
55
60 void SetPointIds(vtkIdList *pointIds);
61
63
66 void ShallowCopy(vtkCell *c) VTK_OVERRIDE;
67 void DeepCopy(vtkCell *c) VTK_OVERRIDE;
68 int GetCellType() VTK_OVERRIDE;
69 int GetCellDimension() VTK_OVERRIDE;
70 int IsLinear() VTK_OVERRIDE;
71 int RequiresInitialization() VTK_OVERRIDE;
72 void Initialize() VTK_OVERRIDE;
73 int RequiresExplicitFaceRepresentation() VTK_OVERRIDE;
74 void SetFaces(vtkIdType *faces) VTK_OVERRIDE;
75 vtkIdType *GetFaces() VTK_OVERRIDE;
76 int GetNumberOfEdges() VTK_OVERRIDE;
77 int GetNumberOfFaces() VTK_OVERRIDE;
78 vtkCell *GetEdge(int edgeId) VTK_OVERRIDE;
79 vtkCell *GetFace(int faceId) VTK_OVERRIDE;
80 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts) VTK_OVERRIDE;
81 int EvaluatePosition(double x[3], double* closestPoint,
82 int& subId, double pcoords[3],
83 double& dist2, double *weights) VTK_OVERRIDE;
84 void EvaluateLocation(int& subId, double pcoords[3],
85 double x[3], double *weights) VTK_OVERRIDE;
86 void Contour(double value, vtkDataArray *cellScalars,
88 vtkCellArray *lines, vtkCellArray *polys,
89 vtkPointData *inPd, vtkPointData *outPd,
90 vtkCellData *inCd, vtkIdType cellId,
91 vtkCellData *outCd) VTK_OVERRIDE;
92 void Clip(double value, vtkDataArray *cellScalars,
93 vtkIncrementalPointLocator *locator, vtkCellArray *connectivity,
94 vtkPointData *inPd, vtkPointData *outPd,
95 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
96 int insideOut) VTK_OVERRIDE;
97 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
98 double x[3], double pcoords[3],
99 int& subId) VTK_OVERRIDE;
100 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts) VTK_OVERRIDE;
101 void Derivatives(int subId, double pcoords[3], double *values,
102 int dim, double *derivs) VTK_OVERRIDE;
103 int GetParametricCenter(double pcoords[3]) VTK_OVERRIDE;
104 double *GetParametricCoords() VTK_OVERRIDE;
105 int IsPrimaryCell() VTK_OVERRIDE;
107
109
113 void InterpolateFunctions(double pcoords[3], double *weights) VTK_OVERRIDE;
114 void InterpolateDerivs(double pcoords[3], double *derivs) VTK_OVERRIDE;
116
124 void SetCellType(int cellType);
125 void SetCellTypeToEmptyCell() {this->SetCellType(VTK_EMPTY_CELL);}
126 void SetCellTypeToVertex() {this->SetCellType(VTK_VERTEX);}
127 void SetCellTypeToPolyVertex() {this->SetCellType(VTK_POLY_VERTEX);}
128 void SetCellTypeToLine() {this->SetCellType(VTK_LINE);}
129 void SetCellTypeToPolyLine() {this->SetCellType(VTK_POLY_LINE);}
130 void SetCellTypeToTriangle() {this->SetCellType(VTK_TRIANGLE);}
132 void SetCellTypeToPolygon() {this->SetCellType(VTK_POLYGON);}
133 void SetCellTypeToPixel() {this->SetCellType(VTK_PIXEL);}
134 void SetCellTypeToQuad() {this->SetCellType(VTK_QUAD);}
135 void SetCellTypeToTetra() {this->SetCellType(VTK_TETRA);}
136 void SetCellTypeToVoxel() {this->SetCellType(VTK_VOXEL);}
137 void SetCellTypeToHexahedron() {this->SetCellType(VTK_HEXAHEDRON);}
138 void SetCellTypeToWedge() {this->SetCellType(VTK_WEDGE);}
139 void SetCellTypeToPyramid() {this->SetCellType(VTK_PYRAMID);}
142 void SetCellTypeToPolyhedron() {this->SetCellType(VTK_POLYHEDRON);}
145 void SetCellTypeToCubicLine() {this->SetCellType(VTK_CUBIC_LINE);}
158 this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);}
160 this->SetCellType(VTK_TRIQUADRATIC_HEXAHEDRON);}
162 this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON);}
163
168
169 vtkCell* GetRepresentativeCell() { return this->Cell; }
170
171protected:
173 ~vtkGenericCell() VTK_OVERRIDE;
174
175 vtkCell *Cell;
176
177private:
178 vtkGenericCell(const vtkGenericCell&) VTK_DELETE_FUNCTION;
179 void operator=(const vtkGenericCell&) VTK_DELETE_FUNCTION;
180};
181
182#endif
object to represent cell connectivity
Definition: vtkCellArray.h:51
represent and manipulate cell attribute data
Definition: vtkCellData.h:39
abstract class to specify cell behavior
Definition: vtkCell.h:60
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
provides thread-safe access to cells
void SetCellTypeToHexahedron()
void SetCellTypeToQuadraticLinearWedge()
static vtkCell * InstantiateCell(int cellType)
Instantiate a new vtkCell based on it's cell type value.
void SetCellTypeToQuadraticWedge()
void SetCellTypeToQuadraticPolygon()
void SetCellTypeToPyramid()
void SetCellTypeToQuadraticTetra()
void SetCellTypeToQuad()
void SetCellTypeToTriangleStrip()
void SetCellTypeToPixel()
vtkCell * GetRepresentativeCell()
void SetCellTypeToQuadraticQuad()
void SetCellTypeToQuadraticLinearQuad()
void SetCellTypeToTetra()
~vtkGenericCell() override
static vtkGenericCell * New()
Create handle to any type of cell; by default a vtkEmptyCell.
void SetCellTypeToPolyhedron()
void SetCellTypeToLine()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetCellTypeToQuadraticHexahedron()
void SetCellTypeToVoxel()
void SetPoints(vtkPoints *points)
Set the points object to use for this cell.
void SetCellTypeToTriQuadraticHexahedron()
void SetCellTypeToBiQuadraticQuadraticHexahedron()
void SetCellTypeToBiQuadraticQuad()
void SetCellTypeToCubicLine()
void SetCellTypeToConvexPointSet()
void DeepCopy(vtkCell *c) override
Copy this cell by completely copying internal data structures.
void SetCellTypeToVertex()
void SetCellTypeToWedge()
void SetCellTypeToTriangle()
void SetCellTypeToQuadraticPyramid()
void SetCellTypeToQuadraticEdge()
int GetCellType() override
Return the type of cell.
void SetCellTypeToBiQuadraticQuadraticWedge()
void SetCellTypeToBiQuadraticTriangle()
void SetCellTypeToPolyLine()
void SetCellTypeToPentagonalPrism()
void SetCellTypeToPolygon()
void SetCellTypeToHexagonalPrism()
void SetCellTypeToPolyVertex()
void ShallowCopy(vtkCell *c) override
See the vtkCell API for descriptions of these methods.
void SetPointIds(vtkIdList *pointIds)
Set the point ids to use for this cell.
void SetCellTypeToQuadraticTriangle()
list of point or cell ids
Definition: vtkIdList.h:37
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate point attribute data
Definition: vtkPointData.h:38
represent and manipulate 3D points
Definition: vtkPoints.h:40
CellTypeInDataSet cellType(vtkDataSet *input)
int Contour(vtkDataSet *input, vtkPolyData *output, vtkDataArray *field, float isoValue, bool computeScalars)
@ points
Definition: vtkX3D.h:446
@ value
Definition: vtkX3D.h:220
@ index
Definition: vtkX3D.h:246
@ VTK_VOXEL
Definition: vtkCellType.h:56
@ VTK_QUADRATIC_HEXAHEDRON
Definition: vtkCellType.h:69
@ VTK_TRIANGLE_STRIP
Definition: vtkCellType.h:51
@ VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON
Definition: vtkCellType.h:77
@ VTK_PYRAMID
Definition: vtkCellType.h:59
@ VTK_PIXEL
Definition: vtkCellType.h:53
@ VTK_QUADRATIC_WEDGE
Definition: vtkCellType.h:70
@ VTK_BIQUADRATIC_QUAD
Definition: vtkCellType.h:72
@ VTK_POLY_LINE
Definition: vtkCellType.h:49
@ VTK_TRIANGLE
Definition: vtkCellType.h:50
@ VTK_POLYGON
Definition: vtkCellType.h:52
@ VTK_EMPTY_CELL
Definition: vtkCellType.h:45
@ VTK_QUADRATIC_PYRAMID
Definition: vtkCellType.h:71
@ VTK_POLYHEDRON
Definition: vtkCellType.h:87
@ VTK_TRIQUADRATIC_HEXAHEDRON
Definition: vtkCellType.h:73
@ VTK_TETRA
Definition: vtkCellType.h:55
@ VTK_LINE
Definition: vtkCellType.h:48
@ VTK_CONVEX_POINT_SET
Definition: vtkCellType.h:84
@ VTK_PENTAGONAL_PRISM
Definition: vtkCellType.h:60
@ VTK_QUADRATIC_QUAD
Definition: vtkCellType.h:66
@ VTK_WEDGE
Definition: vtkCellType.h:58
@ VTK_HEXAGONAL_PRISM
Definition: vtkCellType.h:61
@ VTK_QUADRATIC_LINEAR_WEDGE
Definition: vtkCellType.h:75
@ VTK_HEXAHEDRON
Definition: vtkCellType.h:57
@ VTK_CUBIC_LINE
Definition: vtkCellType.h:81
@ VTK_QUADRATIC_POLYGON
Definition: vtkCellType.h:67
@ VTK_QUAD
Definition: vtkCellType.h:54
@ VTK_QUADRATIC_TRIANGLE
Definition: vtkCellType.h:65
@ VTK_QUADRATIC_EDGE
Definition: vtkCellType.h:64
@ VTK_QUADRATIC_TETRA
Definition: vtkCellType.h:68
@ VTK_VERTEX
Definition: vtkCellType.h:46
@ VTK_POLY_VERTEX
Definition: vtkCellType.h:47
@ VTK_QUADRATIC_LINEAR_QUAD
Definition: vtkCellType.h:74
@ VTK_BIQUADRATIC_QUADRATIC_WEDGE
Definition: vtkCellType.h:76
@ VTK_BIQUADRATIC_TRIANGLE
Definition: vtkCellType.h:78
int vtkIdType
Definition: vtkType.h:287