VTK  9.7.20260718
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
39 virtual void GetEdgePoints(vtkIdType edgeId, const vtkIdType*& pts) VTK_SIZEHINT(pts, 2)
40 VTK_EXPECTS(0 <= edgeId && edgeId < GetNumberOfEdges()) = 0;
41
51 virtual vtkIdType GetFacePoints(vtkIdType faceId, const vtkIdType*& pts) VTK_SIZEHINT(pts, _)
52 VTK_EXPECTS(0 <= faceId && faceId < GetNumberOfFaces()) = 0;
53
61 virtual void GetEdgeToAdjacentFaces(vtkIdType edgeId, const vtkIdType*& faceIds)
62 VTK_SIZEHINT(faceIds, 2) VTK_EXPECTS(0 <= edgeId && edgeId < GetNumberOfEdges()) = 0;
63
79 virtual vtkIdType GetFaceToAdjacentFaces(vtkIdType faceId, const vtkIdType*& faceIds)
80 VTK_SIZEHINT(faceIds, _) VTK_EXPECTS(0 <= faceId && faceId < GetNumberOfFaces()) = 0;
81
96 virtual vtkIdType GetPointToIncidentEdges(vtkIdType pointId, const vtkIdType*& edgeIds)
97 VTK_SIZEHINT(edgeIds, _) VTK_EXPECTS(0 <= pointId && pointId < GetNumberOfPoints()) = 0;
98
115 virtual vtkIdType GetPointToIncidentFaces(vtkIdType pointId, const vtkIdType*& faceIds)
116 VTK_SIZEHINT(faceIds, _) VTK_EXPECTS(0 <= pointId && pointId < GetNumberOfPoints()) = 0;
117
130 VTK_SIZEHINT(pts, _) VTK_EXPECTS(0 <= pointId && pointId < GetNumberOfPoints()) = 0;
131
138 virtual bool IsInsideOut();
139
143 virtual bool GetCentroid(double centroid[3]) const = 0;
144
145 void Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
146 vtkCellArray* verts, vtkCellArray* lines, vtkCellArray* polys, vtkPointData* inPd,
147 vtkPointData* outPd, vtkCellData* inCd, vtkIdType cellId, vtkCellData* outCd) override;
148
161 void Clip(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
162 vtkCellArray* connectivity, vtkPointData* inPd, vtkPointData* outPd, vtkCellData* inCd,
163 vtkIdType cellId, vtkCellData* outCd, int insideOut) override;
164
168 int GetCellDimension() override { return 3; }
169
181 int Inflate(double dist) override;
182
184
189 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
190 vtkGetMacro(MergeTolerance, double);
192
193protected:
195 ~vtkCell3D() override = default;
196
199
200 // used to support clipping
203
204private:
205 vtkCell3D(const vtkCell3D&) = delete;
206 void operator=(const vtkCell3D&) = delete;
207};
208
209VTK_ABI_NAMESPACE_END
210#endif
int GetCellDimension() override
The topological dimension of the cell.
Definition vtkCell3D.h:168
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:198
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:197
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:202
vtkSmartPointer< vtkTetra > ClipTetra
Definition vtkCell3D.h:201
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)