VTK  9.7.1
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 
27 VTK_ABI_NAMESPACE_BEGIN
28 class VTKCOMMONDATAMODEL_EXPORT vtkGenericCell : public vtkCell
29 {
30 public:
34  static vtkGenericCell* New();
35 
36  vtkTypeMacro(vtkGenericCell, vtkCell);
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
43  void SetPoints(vtkPoints* points);
44 
49  void SetPointIds(vtkIdList* pointIds);
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  int SetCellFaces(vtkCellArray* faces);
64  vtkCellArray* GetCellFaces();
65  void GetCellFaces(vtkCellArray* faces);
66  int GetNumberOfEdges() override;
67  int GetNumberOfFaces() override;
68  vtkCell* GetEdge(int edgeId) override;
69  vtkCell* GetFace(int faceId) override;
70  int CellBoundary(int subId, const double pcoords[3], vtkIdList* pts) override;
71  int EvaluatePosition(const double x[3], double closestPoint[3], int& subId, double pcoords[3],
72  double& dist2, double weights[]) override;
73  void EvaluateLocation(int& subId, const double pcoords[3], double x[3], double* weights) override;
74  void Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
75  vtkCellArray* verts, vtkCellArray* lines, vtkCellArray* polys, vtkPointData* inPd,
76  vtkPointData* outPd, vtkCellData* inCd, vtkIdType cellId, vtkCellData* outCd) override;
77  void Clip(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
78  vtkCellArray* connectivity, vtkPointData* inPd, vtkPointData* outPd, vtkCellData* inCd,
79  vtkIdType cellId, vtkCellData* outCd, int insideOut) override;
80  int IntersectWithLine(const double p1[3], const double p2[3], double tol, double& t, double x[3],
81  double pcoords[3], int& subId) override;
82  int Triangulate(int index, vtkIdList* ptIds, vtkPoints* pts) override;
83  int TriangulateLocalIds(int index, vtkIdList* ptIds) override;
84  int TriangulateIds(int index, vtkIdList* ptIds) override;
85  void Derivatives(
86  int subId, const double pcoords[3], const double* values, int dim, double* derivs) override;
87  int GetParametricCenter(double pcoords[3]) override;
88  double* GetParametricCoords() override;
89  int IsPrimaryCell() VTK_FUTURE_CONST override;
91 
93 
97  void InterpolateFunctions(const double pcoords[3], double* weights) override;
98  void InterpolateDerivs(const double pcoords[3], double* derivs) override;
100 
108  void SetCellType(int cellType);
109  void SetCellTypeToEmptyCell() { this->SetCellType(VTK_EMPTY_CELL); }
110  void SetCellTypeToVertex() { this->SetCellType(VTK_VERTEX); }
111  void SetCellTypeToPolyVertex() { this->SetCellType(VTK_POLY_VERTEX); }
112  void SetCellTypeToLine() { this->SetCellType(VTK_LINE); }
113  void SetCellTypeToPolyLine() { this->SetCellType(VTK_POLY_LINE); }
114  void SetCellTypeToTriangle() { this->SetCellType(VTK_TRIANGLE); }
115  void SetCellTypeToTriangleStrip() { this->SetCellType(VTK_TRIANGLE_STRIP); }
116  void SetCellTypeToPolygon() { this->SetCellType(VTK_POLYGON); }
117  void SetCellTypeToPixel() { this->SetCellType(VTK_PIXEL); }
118  void SetCellTypeToQuad() { this->SetCellType(VTK_QUAD); }
119  void SetCellTypeToTetra() { this->SetCellType(VTK_TETRA); }
120  void SetCellTypeToVoxel() { this->SetCellType(VTK_VOXEL); }
121  void SetCellTypeToHexahedron() { this->SetCellType(VTK_HEXAHEDRON); }
122  void SetCellTypeToWedge() { this->SetCellType(VTK_WEDGE); }
123  void SetCellTypeToPyramid() { this->SetCellType(VTK_PYRAMID); }
124  void SetCellTypeToPentagonalPrism() { this->SetCellType(VTK_PENTAGONAL_PRISM); }
125  void SetCellTypeToHexagonalPrism() { this->SetCellType(VTK_HEXAGONAL_PRISM); }
126  void SetCellTypeToPolyhedron() { this->SetCellType(VTK_POLYHEDRON); }
127  void SetCellTypeToConvexPointSet() { this->SetCellType(VTK_CONVEX_POINT_SET); }
128  void SetCellTypeToQuadraticEdge() { this->SetCellType(VTK_QUADRATIC_EDGE); }
129  void SetCellTypeToCubicLine() { this->SetCellType(VTK_CUBIC_LINE); }
132  void SetCellTypeToQuadraticQuad() { this->SetCellType(VTK_QUADRATIC_QUAD); }
134  void SetCellTypeToQuadraticTetra() { this->SetCellType(VTK_QUADRATIC_TETRA); }
136  void SetCellTypeToQuadraticWedge() { this->SetCellType(VTK_QUADRATIC_WEDGE); }
139  void SetCellTypeToBiQuadraticQuad() { this->SetCellType(VTK_BIQUADRATIC_QUAD); }
142  {
143  this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_WEDGE);
144  }
148  {
149  this->SetCellType(VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON);
150  }
153  void SetCellTypeToLagrangeCurve() { this->SetCellType(VTK_LAGRANGE_CURVE); }
156  void SetCellTypeToLagrangeWedge() { this->SetCellType(VTK_LAGRANGE_WEDGE); }
157 
158  void SetCellTypeToBezierTriangle() { this->SetCellType(VTK_BEZIER_TRIANGLE); }
159  void SetCellTypeToBezierTetra() { this->SetCellType(VTK_BEZIER_TETRAHEDRON); }
160  void SetCellTypeToBezierCurve() { this->SetCellType(VTK_BEZIER_CURVE); }
163  void SetCellTypeToBezierWedge() { this->SetCellType(VTK_BEZIER_WEDGE); }
167  static vtkCell* InstantiateCell(int cellType);
168 
169  vtkCell* GetRepresentativeCell() { return this->Cell; }
170 
171 protected:
172  vtkGenericCell();
173  ~vtkGenericCell() override;
174 
177 
178 private:
179  vtkGenericCell(const vtkGenericCell&) = delete;
180  void operator=(const vtkGenericCell&) = delete;
181 };
182 
183 VTK_ABI_NAMESPACE_END
184 #endif
virtual void DeepCopy(vtkCell *c)
Copy this cell by completely copying internal data structures.
void SetCellTypeToLagrangeTetra()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetCellTypeToPyramid()
virtual int GetCellDimension()=0
Return the topological dimensional of the cell (0,1,2, or 3).
void SetCellTypeToTriangle()
represent and manipulate point attribute data
Definition: vtkPointData.h:30
void SetCellTypeToPolyVertex()
void SetCellTypeToConvexPointSet()
virtual int GetCellType()=0
Return the type of cell.
void SetCellTypeToPentagonalPrism()
void SetCellTypeToHexahedron()
represent and manipulate cell attribute data
Definition: vtkCellData.h:31
void SetCellTypeToBiQuadraticQuadraticHexahedron()
Abstract class in support of both point location and point insertion.
void SetCellTypeToQuadraticPolygon()
void SetCellTypeToPolyhedron()
void SetCellTypeToLagrangeTriangle()
void SetCellTypeToPolygon()
int vtkIdType
Definition: vtkType.h:363
void SetCellTypeToQuadraticQuad()
void SetCellTypeToPolyLine()
virtual int IsLinear() VTK_FUTURE_CONST
Non-linear cells require special treatment beyond the usual cell type and connectivity list informati...
Definition: vtkCell.h:98
provides thread-safe access to cells
void SetCellTypeToLagrangeHexahedron()
void SetCellTypeToPixel()
void SetCellTypeToBezierHexahedron()
void SetCellTypeToBezierTriangle()
void SetCellTypeToTetra()
void SetCellTypeToWedge()
void SetCellTypeToQuadraticWedge()
abstract class to specify cell behavior
Definition: vtkCell.h:50
void SetCellTypeToTriQuadraticHexahedron()
void SetCellTypeToLagrangeWedge()
void SetCellTypeToBezierTetra()
void SetCellTypeToBezierQuadrilateral()
a simple class to control print indentation
Definition: vtkIndent.h:28
list of point or cell ids
Definition: vtkIdList.h:25
void SetCellTypeToQuad()
void SetCellTypeToTriQuadraticPyramid()
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
void SetCellTypeToBezierCurve()
void SetCellTypeToBezierWedge()
const std::string pointIds
void SetCellTypeToVoxel()
void SetCellTypeToQuadraticLinearQuad()
void SetCellTypeToVertex()
void SetCellTypeToQuadraticPyramid()
void SetCellTypeToBiQuadraticQuadraticWedge()
void SetCellTypeToQuadraticEdge()
vtkCell * GetRepresentativeCell()
virtual void ShallowCopy(vtkCell *c)
Copy this cell by reference counting the internal data structures.
object to represent cell connectivity
Definition: vtkCellArray.h:177
void SetCellTypeToBiQuadraticTriangle()
void SetCellTypeToQuadraticLinearWedge()
void SetCellTypeToLine()
void SetCellTypeToTriangleStrip()
void SetCellTypeToQuadraticTriangle()
void SetCellTypeToHexagonalPrism()
void SetCellTypeToLagrangeQuadrilateral()
void SetCellTypeToLagrangeCurve()
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void SetCellTypeToQuadraticTetra()
void SetCellTypeToCubicLine()
void SetCellTypeToBiQuadraticQuad()
represent and manipulate 3D points
Definition: vtkPoints.h:30
void SetCellTypeToQuadraticHexahedron()