VTK  9.5.2
vtkGenericCell.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
21#ifndef vtkGenericCell_h
22#define vtkGenericCell_h
23
24#include "vtkCell.h"
25#include "vtkCommonDataModelModule.h" // For export macro
26
27VTK_ABI_NAMESPACE_BEGIN
28class VTKCOMMONDATAMODEL_EXPORT vtkGenericCell : public vtkCell
29{
30public:
35
36 vtkTypeMacro(vtkGenericCell, vtkCell);
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
44
50
52
55 void ShallowCopy(vtkCell* c) override;
56 void DeepCopy(vtkCell* c) override;
57 int GetCellType() override;
58 int GetCellDimension() override;
59 int IsLinear() VTK_FUTURE_CONST override;
60 int RequiresInitialization() override;
61 void Initialize() override;
62 int RequiresExplicitFaceRepresentation() VTK_FUTURE_CONST override;
63 VTK_DEPRECATED_IN_9_4_0("Use SetCellFaces.")
64 void SetFaces(vtkIdType* faces) override;
65 VTK_DEPRECATED_IN_9_4_0("Use GetCellFaces.")
66 vtkIdType* GetFaces() override;
67 int SetCellFaces(vtkCellArray* faces);
68 vtkCellArray* GetCellFaces();
69 void GetCellFaces(vtkCellArray* faces);
70 int GetNumberOfEdges() override;
71 int GetNumberOfFaces() override;
72 vtkCell* GetEdge(int edgeId) override;
73 vtkCell* GetFace(int faceId) override;
74 int CellBoundary(int subId, const double pcoords[3], vtkIdList* pts) override;
75 int EvaluatePosition(const double x[3], double closestPoint[3], int& subId, double pcoords[3],
76 double& dist2, double weights[]) override;
77 void EvaluateLocation(int& subId, const double pcoords[3], double x[3], double* weights) override;
78 void Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
79 vtkCellArray* verts, vtkCellArray* lines, vtkCellArray* polys, vtkPointData* inPd,
80 vtkPointData* outPd, vtkCellData* inCd, vtkIdType cellId, vtkCellData* outCd) override;
81 void Clip(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
82 vtkCellArray* connectivity, vtkPointData* inPd, vtkPointData* outPd, vtkCellData* inCd,
83 vtkIdType cellId, vtkCellData* outCd, int insideOut) override;
84 int IntersectWithLine(const double p1[3], const double p2[3], double tol, double& t, double x[3],
85 double pcoords[3], int& subId) override;
86 int Triangulate(int index, vtkIdList* ptIds, vtkPoints* pts) override;
87 int TriangulateLocalIds(int index, vtkIdList* ptIds) override;
88 int TriangulateIds(int index, vtkIdList* ptIds) override;
89 void Derivatives(
90 int subId, const double pcoords[3], const double* values, int dim, double* derivs) override;
91 int GetParametricCenter(double pcoords[3]) override;
92 double* GetParametricCoords() override;
93 int IsPrimaryCell() VTK_FUTURE_CONST override;
95
97
101 void InterpolateFunctions(const double pcoords[3], double* weights) override;
102 void InterpolateDerivs(const double pcoords[3], double* derivs) override;
104
112 void SetCellType(int cellType);
113 void SetCellTypeToEmptyCell() { this->SetCellType(VTK_EMPTY_CELL); }
114 void SetCellTypeToVertex() { this->SetCellType(VTK_VERTEX); }
115 void SetCellTypeToPolyVertex() { this->SetCellType(VTK_POLY_VERTEX); }
116 void SetCellTypeToLine() { this->SetCellType(VTK_LINE); }
117 void SetCellTypeToPolyLine() { this->SetCellType(VTK_POLY_LINE); }
118 void SetCellTypeToTriangle() { this->SetCellType(VTK_TRIANGLE); }
119 void SetCellTypeToTriangleStrip() { this->SetCellType(VTK_TRIANGLE_STRIP); }
120 void SetCellTypeToPolygon() { this->SetCellType(VTK_POLYGON); }
121 void SetCellTypeToPixel() { this->SetCellType(VTK_PIXEL); }
122 void SetCellTypeToQuad() { this->SetCellType(VTK_QUAD); }
123 void SetCellTypeToTetra() { this->SetCellType(VTK_TETRA); }
124 void SetCellTypeToVoxel() { this->SetCellType(VTK_VOXEL); }
125 void SetCellTypeToHexahedron() { this->SetCellType(VTK_HEXAHEDRON); }
126 void SetCellTypeToWedge() { this->SetCellType(VTK_WEDGE); }
127 void SetCellTypeToPyramid() { this->SetCellType(VTK_PYRAMID); }
130 void SetCellTypeToPolyhedron() { this->SetCellType(VTK_POLYHEDRON); }
132 void SetCellTypeToQuadraticEdge() { this->SetCellType(VTK_QUADRATIC_EDGE); }
133 void SetCellTypeToCubicLine() { this->SetCellType(VTK_CUBIC_LINE); }
136 void SetCellTypeToQuadraticQuad() { this->SetCellType(VTK_QUADRATIC_QUAD); }
146 {
147 this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);
148 }
152 {
153 this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON);
154 }
157 void SetCellTypeToLagrangeCurve() { this->SetCellType(VTK_LAGRANGE_CURVE); }
160 void SetCellTypeToLagrangeWedge() { this->SetCellType(VTK_LAGRANGE_WEDGE); }
161
164 void SetCellTypeToBezierCurve() { this->SetCellType(VTK_BEZIER_CURVE); }
167 void SetCellTypeToBezierWedge() { this->SetCellType(VTK_BEZIER_WEDGE); }
171 static vtkCell* InstantiateCell(int cellType);
172
173 vtkCell* GetRepresentativeCell() { return this->Cell; }
174
175protected:
177 ~vtkGenericCell() override;
178
181
182private:
183 vtkGenericCell(const vtkGenericCell&) = delete;
184 void operator=(const vtkGenericCell&) = delete;
185};
186
187VTK_ABI_NAMESPACE_END
188#endif
object to represent cell connectivity
Definition: vtkCellArray.h:177
represent and manipulate cell attribute data
Definition: vtkCellData.h:32
abstract class to specify cell behavior
Definition: vtkCell.h:51
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:46
provides thread-safe access to cells
void SetCellTypeToLagrangeCurve()
void SetCellTypeToHexahedron()
void SetCellTypeToQuadraticLinearWedge()
int IsLinear() VTK_FUTURE_CONST override
See the vtkCell API for descriptions of these methods.
static vtkCell * InstantiateCell(int cellType)
Instantiate a new vtkCell based on it's cell type value.
void SetCellTypeToLagrangeWedge()
void SetCellTypeToQuadraticWedge()
void SetCellTypeToQuadraticPolygon()
void SetCellTypeToPyramid()
void SetCellTypeToQuadraticTetra()
void SetCellTypeToQuad()
void SetCellTypeToTriangleStrip()
void SetCellTypeToPixel()
vtkCell * GetRepresentativeCell()
void SetCellTypeToQuadraticQuad()
void SetCellTypeToQuadraticLinearQuad()
void SetCellTypeToBezierWedge()
void SetCellTypeToTetra()
~vtkGenericCell() override
static vtkGenericCell * New()
Create handle to any type of cell; by default a vtkEmptyCell.
void SetCellTypeToLagrangeTetra()
void SetCellTypeToPolyhedron()
void SetCellTypeToLine()
void SetCellTypeToBezierTetra()
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()
int GetCellDimension() override
See the vtkCell API for descriptions of these methods.
void DeepCopy(vtkCell *c) override
See the vtkCell API for descriptions of these methods.
void SetCellTypeToVertex()
void SetCellTypeToBezierCurve()
void SetCellTypeToLagrangeTriangle()
void SetCellTypeToWedge()
void SetCellTypeToTriangle()
void SetCellTypeToQuadraticPyramid()
void SetCellTypeToQuadraticEdge()
int GetCellType() override
See the vtkCell API for descriptions of these methods.
void SetCellTypeToBiQuadraticQuadraticWedge()
void SetCellTypeToBiQuadraticTriangle()
void SetCellTypeToPolyLine()
void SetCellTypeToPentagonalPrism()
void SetCellTypeToPolygon()
void SetCellTypeToBezierQuadrilateral()
void SetCellTypeToLagrangeQuadrilateral()
void SetCellTypeToBezierTriangle()
void SetCellTypeToHexagonalPrism()
void SetCellTypeToBezierHexahedron()
void SetCellTypeToLagrangeHexahedron()
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 SetCellTypeToTriQuadraticPyramid()
void SetCellTypeToQuadraticTriangle()
list of point or cell ids
Definition: vtkIdList.h:24
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:29
represent and manipulate point attribute data
Definition: vtkPointData.h:31
represent and manipulate 3D points
Definition: vtkPoints.h:30
const std::string pointIds
@ points
Definition: vtkX3D.h:446
@ value
Definition: vtkX3D.h:220
@ index
Definition: vtkX3D.h:246
@ VTK_VOXEL
Definition: vtkCellType.h:48
@ VTK_QUADRATIC_HEXAHEDRON
Definition: vtkCellType.h:61
@ VTK_TRIANGLE_STRIP
Definition: vtkCellType.h:43
@ VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON
Definition: vtkCellType.h:70
@ VTK_NUMBER_OF_CELL_TYPES
Definition: vtkCellType.h:118
@ VTK_LAGRANGE_CURVE
Definition: vtkCellType.h:101
@ VTK_PYRAMID
Definition: vtkCellType.h:51
@ VTK_PIXEL
Definition: vtkCellType.h:45
@ VTK_QUADRATIC_WEDGE
Definition: vtkCellType.h:62
@ VTK_BEZIER_WEDGE
Definition: vtkCellType.h:115
@ VTK_BIQUADRATIC_QUAD
Definition: vtkCellType.h:64
@ VTK_LAGRANGE_QUADRILATERAL
Definition: vtkCellType.h:103
@ VTK_POLY_LINE
Definition: vtkCellType.h:41
@ VTK_TRIQUADRATIC_PYRAMID
Definition: vtkCellType.h:66
@ VTK_TRIANGLE
Definition: vtkCellType.h:42
@ VTK_BEZIER_TRIANGLE
Definition: vtkCellType.h:111
@ VTK_POLYGON
Definition: vtkCellType.h:44
@ VTK_EMPTY_CELL
Definition: vtkCellType.h:37
@ VTK_QUADRATIC_PYRAMID
Definition: vtkCellType.h:63
@ VTK_POLYHEDRON
Definition: vtkCellType.h:80
@ VTK_TRIQUADRATIC_HEXAHEDRON
Definition: vtkCellType.h:65
@ VTK_TETRA
Definition: vtkCellType.h:47
@ VTK_LINE
Definition: vtkCellType.h:40
@ VTK_CONVEX_POINT_SET
Definition: vtkCellType.h:77
@ VTK_BEZIER_HEXAHEDRON
Definition: vtkCellType.h:114
@ VTK_LAGRANGE_WEDGE
Definition: vtkCellType.h:106
@ VTK_LAGRANGE_HEXAHEDRON
Definition: vtkCellType.h:105
@ VTK_PENTAGONAL_PRISM
Definition: vtkCellType.h:52
@ VTK_QUADRATIC_QUAD
Definition: vtkCellType.h:58
@ VTK_WEDGE
Definition: vtkCellType.h:50
@ VTK_LAGRANGE_TETRAHEDRON
Definition: vtkCellType.h:104
@ VTK_BEZIER_CURVE
Definition: vtkCellType.h:110
@ VTK_HEXAGONAL_PRISM
Definition: vtkCellType.h:53
@ VTK_BEZIER_QUADRILATERAL
Definition: vtkCellType.h:112
@ VTK_QUADRATIC_LINEAR_WEDGE
Definition: vtkCellType.h:68
@ VTK_HEXAHEDRON
Definition: vtkCellType.h:49
@ VTK_CUBIC_LINE
Definition: vtkCellType.h:74
@ VTK_LAGRANGE_TRIANGLE
Definition: vtkCellType.h:102
@ VTK_QUADRATIC_POLYGON
Definition: vtkCellType.h:59
@ VTK_QUAD
Definition: vtkCellType.h:46
@ VTK_QUADRATIC_TRIANGLE
Definition: vtkCellType.h:57
@ VTK_QUADRATIC_EDGE
Definition: vtkCellType.h:56
@ VTK_QUADRATIC_TETRA
Definition: vtkCellType.h:60
@ VTK_BEZIER_TETRAHEDRON
Definition: vtkCellType.h:113
@ VTK_VERTEX
Definition: vtkCellType.h:38
@ VTK_POLY_VERTEX
Definition: vtkCellType.h:39
@ VTK_QUADRATIC_LINEAR_QUAD
Definition: vtkCellType.h:67
@ VTK_BIQUADRATIC_QUADRATIC_WEDGE
Definition: vtkCellType.h:69
@ VTK_BIQUADRATIC_TRIANGLE
Definition: vtkCellType.h:71
#define VTK_DEPRECATED_IN_9_4_0(reason)
int vtkIdType
Definition: vtkType.h:332