VTK  9.6.20260405
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
14
15#ifndef vtkCell3D_h
16#define vtkCell3D_h
17
18#include "vtkCell.h"
19#include "vtkCommonDataModelModule.h" // For export macro
20
21VTK_ABI_NAMESPACE_BEGIN
23class vtkTetra;
24class vtkCellArray;
25class vtkDoubleArray;
26
27class VTKCOMMONDATAMODEL_EXPORT vtkCell3D : public vtkCell
28{
29public:
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
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
194protected:
196 ~vtkCell3D() override = default;
197
200
201 // used to support clipping
204
205private:
206 vtkCell3D(const vtkCell3D&) = delete;
207 void operator=(const vtkCell3D&) = delete;
208};
209
210VTK_ABI_NAMESPACE_END
211#endif
int GetCellDimension() override
The topological dimension of the cell.
Definition vtkCell3D.h:169
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut) override
Cut (or clip) the cell based on the input cellScalars and the specified value.
~vtkCell3D() override=default
double MergeTolerance
Definition vtkCell3D.h:199
virtual vtkIdType GetPointToIncidentEdges(vtkIdType pointId, const vtkIdType *&edgeIds)=0
Get the ids of the incident edges to point of id pointId.
virtual vtkIdType GetPointToOneRingPoints(vtkIdType pointId, const vtkIdType *&pts)=0
Get the ids of a one-ring surrounding point of id pointId.
vtkSmartPointer< vtkOrderedTriangulator > Triangulator
Definition vtkCell3D.h:198
void Contour(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *verts, vtkCellArray *lines, vtkCellArray *polys, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd) override
Generate contouring primitives.
virtual vtkIdType GetFacePoints(vtkIdType faceId, const vtkIdType *&pts)=0
Get the list of vertices that define a face.
virtual vtkIdType GetFaceToAdjacentFaces(vtkIdType faceId, const vtkIdType *&faceIds)=0
Get the ids of the adjacent faces to face of id faceId.
vtkSmartPointer< vtkDoubleArray > ClipScalars
Definition vtkCell3D.h:203
vtkSmartPointer< vtkTetra > ClipTetra
Definition vtkCell3D.h:202
virtual bool IsInsideOut()
Returns true if the normals of the vtkCell3D point inside the cell.
virtual bool GetCentroid(double centroid[3]) const =0
Computes the centroid of the cell.
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.
virtual void GetEdgeToAdjacentFaces(vtkIdType edgeId, const vtkIdType *&faceIds)=0
Get the ids of the two adjacent faces to edge of id edgeId.
virtual vtkIdType GetPointToIncidentFaces(vtkIdType pointId, const vtkIdType *&faceIds)=0
Get the ids of the incident faces point of id pointId.
object to represent cell connectivity
represent and manipulate cell attribute data
virtual int GetNumberOfEdges()=0
Return the number of edges in the cell.
virtual int GetNumberOfFaces()=0
Return the number of faces in the cell.
vtkIdType GetNumberOfPoints() const
Return the number of points in the cell.
Definition vtkCell.h:208
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
Hold a reference to a vtkObjectBase instance.
a 3D cell that represents a tetrahedron
Definition vtkTetra.h:113
#define vtkDataArray
int vtkIdType
Definition vtkType.h:363
#define VTK_SIZEHINT(...)
#define VTK_EXPECTS(x)