VTK  9.6.20260201
vtkConvexPointSet.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
39
40#ifndef vtkConvexPointSet_h
41#define vtkConvexPointSet_h
42
43#include "vtkCell3D.h"
44#include "vtkCommonDataModelModule.h" // For export macro
45
46VTK_ABI_NAMESPACE_BEGIN
48class vtkCellArray;
49class vtkTriangle;
50class vtkTetra;
51class vtkDoubleArray;
52
53class VTKCOMMONDATAMODEL_EXPORT vtkConvexPointSet : public vtkCell3D
54{
55public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
61
65 void GetEdgePoints(vtkIdType vtkNotUsed(edgeId), const vtkIdType*& vtkNotUsed(pts)) override
66 {
67 vtkWarningMacro(<< "vtkConvexPointSet::GetEdgePoints Not Implemented");
68 }
69 vtkIdType GetFacePoints(vtkIdType vtkNotUsed(faceId), const vtkIdType*& vtkNotUsed(pts)) override
70 {
71 vtkWarningMacro(<< "vtkConvexPointSet::GetFacePoints Not Implemented");
72 return 0;
73 }
75 vtkIdType vtkNotUsed(edgeId), const vtkIdType*& vtkNotUsed(pts)) override
76 {
77 vtkWarningMacro(<< "vtkConvexPointSet::GetEdgeToAdjacentFaces Not Implemented");
78 }
80 vtkIdType vtkNotUsed(faceId), const vtkIdType*& vtkNotUsed(faceIds)) override
81 {
82 vtkWarningMacro(<< "vtkConvexPointSet::GetFaceToAdjacentFaces Not Implemented");
83 return 0;
84 }
86 vtkIdType vtkNotUsed(pointId), const vtkIdType*& vtkNotUsed(edgeIds)) override
87 {
88 vtkWarningMacro(<< "vtkConvexPointSet::GetPointToIncidentEdges Not Implemented");
89 return 0;
90 }
92 vtkIdType vtkNotUsed(pointId), const vtkIdType*& vtkNotUsed(faceIds)) override
93 {
94 vtkWarningMacro(<< "vtkConvexPointSet::GetPointToIncidentFaces Not Implemented");
95 return 0;
96 }
98 vtkIdType vtkNotUsed(pointId), const vtkIdType*& vtkNotUsed(pts)) override
99 {
100 vtkWarningMacro(<< "vtkConvexPointSet::GetPointToOneRingPoints Not Implemented");
101 return 0;
102 }
103 bool GetCentroid(double vtkNotUsed(centroid)[3]) const override
104 {
105 vtkWarningMacro(<< "vtkConvexPointSet::GetCentroid Not Implemented");
106 return false;
107 }
108
109
113 double* GetParametricCoords() override;
114
118 int GetCellType() override { return VTK_CONVEX_POINT_SET; }
119
123 int RequiresInitialization() override { return 1; }
124 void Initialize() override;
125
127
137 int GetNumberOfEdges() override { return 0; }
138 vtkCell* GetEdge(int) override { return nullptr; }
139 int GetNumberOfFaces() override;
140 vtkCell* GetFace(int faceId) override;
142
147 void Contour(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
148 vtkCellArray* verts, vtkCellArray* lines, vtkCellArray* polys, vtkPointData* inPd,
149 vtkPointData* outPd, vtkCellData* inCd, vtkIdType cellId, vtkCellData* outCd) override;
150
156 void Clip(double value, vtkDataArray* cellScalars, vtkIncrementalPointLocator* locator,
157 vtkCellArray* connectivity, vtkPointData* inPd, vtkPointData* outPd, vtkCellData* inCd,
158 vtkIdType cellId, vtkCellData* outCd, int insideOut) override;
159
165 int EvaluatePosition(const double x[3], double closestPoint[3], int& subId, double pcoords[3],
166 double& dist2, double weights[]) override;
167
171 void EvaluateLocation(int& subId, const double pcoords[3], double x[3], double* weights) override;
172
177 int IntersectWithLine(const double p1[3], const double p2[3], double tol, double& t, double x[3],
178 double pcoords[3], int& subId) override;
179
183 int TriangulateLocalIds(int index, vtkIdList* ptIds) override;
184
190 int subId, const double pcoords[3], const double* values, int dim, double* derivs) override;
191
197 int CellBoundary(int subId, const double pcoords[3], vtkIdList* pts) override;
198
202 int GetParametricCenter(double pcoords[3]) override;
203
208 int IsPrimaryCell() VTK_FUTURE_CONST override { return 0; }
209
211
215 void InterpolateFunctions(const double pcoords[3], double* sf) override;
216 void InterpolateDerivs(const double pcoords[3], double* derivs) override;
218
219protected:
222
227
231
232private:
233 vtkConvexPointSet(const vtkConvexPointSet&) = delete;
234 void operator=(const vtkConvexPointSet&) = delete;
235};
236
237//----------------------------------------------------------------------------
238inline int vtkConvexPointSet::GetParametricCenter(double pcoords[3])
239{
240 pcoords[0] = pcoords[1] = pcoords[2] = 0.5;
241 return 0;
242}
243
244VTK_ABI_NAMESPACE_END
245#endif
object to represent cell connectivity
represent and manipulate cell attribute data
virtual int GetParametricCenter(double pcoords[3])
Return center of the cell in parametric coordinates.
double * GetParametricCoords() override
See vtkCell3D API for description of this method.
bool GetCentroid(double centroid[3]) const override
See vtkCell3D API for description of these methods.
vtkDoubleArray * ParametricCoords
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCell * GetFace(int faceId) override
A convex point set has no explicit cell edge or faces; however implicitly (after triangulation) it do...
int GetNumberOfEdges() override
A convex point set has no explicit cell edge or faces; however implicitly (after triangulation) it do...
int RequiresInitialization() override
This cell requires that it be initialized prior to access.
vtkDoubleArray * TetraScalars
vtkIdType GetPointToIncidentFaces(vtkIdType pointId, const vtkIdType *&faceIds) override
See vtkCell3D API for description of these methods.
static vtkConvexPointSet * New()
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
Satisfy the vtkCell API.
void GetEdgeToAdjacentFaces(vtkIdType edgeId, const vtkIdType *&pts) override
See vtkCell3D API for description of these methods.
int CellBoundary(int subId, const double pcoords[3], vtkIdList *pts) override
Returns the set of points forming a face of the triangulation of these points that are on the boundar...
void Clip(double value, vtkDataArray *cellScalars, vtkIncrementalPointLocator *locator, vtkCellArray *connectivity, vtkPointData *inPd, vtkPointData *outPd, vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd, int insideOut) override
Satisfy the vtkCell API.
vtkIdType GetFaceToAdjacentFaces(vtkIdType faceId, const vtkIdType *&faceIds) override
See vtkCell3D API for description of these methods.
~vtkConvexPointSet() override
void Initialize() override
void GetEdgePoints(vtkIdType edgeId, const vtkIdType *&pts) override
See vtkCell3D API for description of these methods.
int IsPrimaryCell() VTK_FUTURE_CONST override
A convex point set is triangulated prior to any operations on it so it is not a primary cell,...
int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId) override
Triangulates the cells and then intersects them to determine the intersection point.
vtkIdType GetPointToOneRingPoints(vtkIdType pointId, const vtkIdType *&pts) override
See vtkCell3D API for description of these methods.
void InterpolateDerivs(const double pcoords[3], double *derivs) override
Compute the interpolation functions/derivatives (aka shape functions/derivatives)
vtkCellArray * BoundaryTris
vtkIdType GetFacePoints(vtkIdType faceId, const vtkIdType *&pts) override
See vtkCell3D API for description of these methods.
int TriangulateLocalIds(int index, vtkIdList *ptIds) override
Triangulate using methods of vtkOrderedTriangulator.
int EvaluatePosition(const double x[3], double closestPoint[3], int &subId, double pcoords[3], double &dist2, double weights[]) override
Satisfy the vtkCell API.
int GetParametricCenter(double pcoords[3]) override
Return the center of the cell in parametric coordinates.
int GetCellType() override
See the vtkCell API for descriptions of these methods.
int GetNumberOfFaces() override
A convex point set has no explicit cell edge or faces; however implicitly (after triangulation) it do...
void Derivatives(int subId, const double pcoords[3], const double *values, int dim, double *derivs) override
Computes derivatives by triangulating and from subId and pcoords, evaluating derivatives on the resul...
void InterpolateFunctions(const double pcoords[3], double *sf) override
Compute the interpolation functions/derivatives (aka shape functions/derivatives)
vtkCell * GetEdge(int) override
A convex point set has no explicit cell edge or faces; however implicitly (after triangulation) it do...
vtkIdType GetPointToIncidentEdges(vtkIdType pointId, const vtkIdType *&edgeIds) override
See vtkCell3D API for description of these methods.
void EvaluateLocation(int &subId, const double pcoords[3], double x[3], double *weights) override
The inverse of EvaluatePosition.
dynamic, self-adjusting array of double
list of point or cell ids
Definition vtkIdList.h:133
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition vtkIndent.h:108
represent and manipulate point attribute data
represent and manipulate 3D points
Definition vtkPoints.h:139
a 3D cell that represents a tetrahedron
Definition vtkTetra.h:113
a cell that represents a triangle
dataset represents arbitrary combinations of all possible cell types
@ VTK_CONVEX_POINT_SET
Definition vtkCellType.h:76
#define vtkDataArray
int vtkIdType
Definition vtkType.h:354