VTK  9.3.20240328
vtkCell3D.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
15 #ifndef vtkCell3D_h
16 #define vtkCell3D_h
17 
18 #include "vtkCell.h"
19 #include "vtkCommonDataModelModule.h" // For export macro
20 
21 VTK_ABI_NAMESPACE_BEGIN
23 class vtkTetra;
24 class vtkCellArray;
25 class vtkDoubleArray;
26 
27 class VTKCOMMONDATAMODEL_EXPORT vtkCell3D : public vtkCell
28 {
29 public:
30  vtkTypeMacro(vtkCell3D, vtkCell);
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
40  virtual void GetEdgePoints(vtkIdType edgeId, const vtkIdType*& pts) VTK_SIZEHINT(pts, 2)
41  VTK_EXPECTS(0 <= edgeId && edgeId < GetNumberOfEdges()) = 0;
42 
52  virtual vtkIdType GetFacePoints(vtkIdType faceId, const vtkIdType*& pts) VTK_SIZEHINT(pts, _)
53  VTK_EXPECTS(0 <= faceId && faceId < GetNumberOfFaces()) = 0;
54 
62  virtual void GetEdgeToAdjacentFaces(vtkIdType edgeId, const vtkIdType*& faceIds)
63  VTK_SIZEHINT(faceIds, 2) VTK_EXPECTS(0 <= edgeId && edgeId < GetNumberOfEdges()) = 0;
64 
80  virtual vtkIdType GetFaceToAdjacentFaces(vtkIdType faceId, const vtkIdType*& faceIds)
81  VTK_SIZEHINT(faceIds, _) VTK_EXPECTS(0 <= faceId && faceId < GetNumberOfFaces()) = 0;
82 
97  virtual vtkIdType GetPointToIncidentEdges(vtkIdType pointId, const vtkIdType*& edgeIds)
98  VTK_SIZEHINT(edgeIds, _) VTK_EXPECTS(0 <= pointId && pointId < GetNumberOfPoints()) = 0;
99 
116  virtual vtkIdType GetPointToIncidentFaces(vtkIdType pointId, const vtkIdType*& faceIds)
117  VTK_SIZEHINT(faceIds, _) VTK_EXPECTS(0 <= pointId && pointId < GetNumberOfPoints()) = 0;
118 
130  virtual vtkIdType GetPointToOneRingPoints(vtkIdType pointId, const vtkIdType*& pts)
131  VTK_SIZEHINT(pts, _) VTK_EXPECTS(0 <= pointId && pointId < GetNumberOfPoints()) = 0;
132 
139  virtual bool IsInsideOut();
140 
144  virtual bool GetCentroid(double centroid[3]) const = 0;
145 
146  void Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
147  vtkCellArray* verts, vtkCellArray* lines, vtkCellArray* polys, vtkPointData* inPd,
148  vtkPointData* outPd, vtkCellData* inCd, vtkIdType cellId, vtkCellData* outCd) override;
149 
162  void Clip(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
163  vtkCellArray* connectivity, vtkPointData* inPd, vtkPointData* outPd, vtkCellData* inCd,
164  vtkIdType cellId, vtkCellData* outCd, int insideOut) override;
165 
169  int GetCellDimension() override { return 3; }
170 
182  int Inflate(double dist) override;
183 
185 
190  vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
191  vtkGetMacro(MergeTolerance, double);
193 
194 protected:
196  ~vtkCell3D() override;
197 
200 
201  // used to support clipping
204 
205 private:
206  vtkCell3D(const vtkCell3D&) = delete;
207  void operator=(const vtkCell3D&) = delete;
208 };
209 
210 VTK_ABI_NAMESPACE_END
211 #endif
abstract class to specify 3D cell interface
Definition: vtkCell3D.h:28
~vtkCell3D() override
double MergeTolerance
Definition: vtkCell3D.h:199
vtkOrderedTriangulator * Triangulator
Definition: vtkCell3D.h:198
vtkTetra * ClipTetra
Definition: vtkCell3D.h:202
virtual void GetEdgePoints(vtkIdType edgeId, const vtkIdType *&pts)=0
Get the pair of vertices that define an edge.
int Inflate(double dist) override
Inflates the cell.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDoubleArray * ClipScalars
Definition: vtkCell3D.h:203
object to represent cell connectivity
Definition: vtkCellArray.h:285
represent and manipulate cell attribute data
Definition: vtkCellData.h:140
abstract class to specify cell behavior
Definition: vtkCell.h:130
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:154
dynamic, self-adjusting array of double
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:108
helper class to generate triangulations
represent and manipulate point attribute data
Definition: vtkPointData.h:139
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:113
@ value
Definition: vtkX3D.h:220
int vtkIdType
Definition: vtkType.h:315
#define VTK_SIZEHINT(...)
#define VTK_EXPECTS(x)