128 #ifndef vtkPolyhedron_h
129 #define vtkPolyhedron_h
133 #include "vtkCommonDataModelModule.h"
137 VTK_ABI_NAMESPACE_BEGIN
176 vtkWarningMacro(<<
"vtkPolyhedron::GetEdgePoints Not Implemented");
182 vtkWarningMacro(<<
"vtkPolyhedron::GetEdgeToAdjacentFaces Not Implemented");
187 vtkWarningMacro(<<
"vtkPolyhedron::GetFaceToAdjacentFaces Not Implemented");
193 vtkWarningMacro(<<
"vtkPolyhedron::GetPointToIncidentEdges Not Implemented");
200 vtkWarningMacro(<<
"vtkPolyhedron::GetPointToOneRingPoints Not Implemented");
203 bool GetCentroid(
double centroid[3])
const override;
210 double ComputeVolume();
290 int EvaluatePosition(
const double x[3],
double closestPoint[3],
int& subId,
double pcoords[3],
291 double& dist2,
double weights[])
override;
297 void EvaluateLocation(
int& subId,
const double pcoords[3],
double x[3],
double* weights)
override;
305 int IntersectWithLine(
const double p1[3],
const double p2[3],
double tol,
double& t,
double x[3],
306 double pcoords[3],
int& subId)
override;
331 int TriangulateFaces(
vtkIdList* newFaces);
349 int subId,
const double pcoords[3],
const double* values,
int dim,
double* derivs)
override;
450 int IsInside(const
double x[3],
double tolerance);
469 Status IsConvex(
double planarThreshold);
479 void ShallowCopy(
vtkCell* c) override;
484 void DeepCopy(
vtkCell* c) override;
488 ~vtkPolyhedron() override;
506 int EdgesGenerated = 0;
517 void GenerateFaces();
519 int FacesGenerated = 0;
522 int BoundsComputed = 0;
523 void ComputeBounds();
524 void ComputeParametricCoordinate(const
double x[3],
double pc[3]);
525 void ComputePositionFromParametricCoordinate(const
double pc[3],
double x[3]);
528 int PolyDataConstructed = 0;
530 void ConstructPolyData();
531 int LocatorConstructed = 0;
533 void ConstructLocator();
538 vtkPolyhedron(const vtkPolyhedron&) = delete;
539 void operator=(const vtkPolyhedron&) = delete;
551 void GeneratePointToIncidentFaces();
555 int GenerateEdges(
std::map<
vtkIdType,
int>& unevenCoedges);
561 VTK_ABI_NAMESPACE_END
virtual void InterpolateDerivs(const double pcoords[3], double *derivs)
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.
represent and manipulate point attribute data
virtual int GetNumberOfFaces()=0
Return the number of faces in the cell.
Isosurface extraction using López polygon tracing algorithm.
int RequiresInitialization() override
This cell requires that it be initialized prior to access.
vtkIdType GetPointToIncidentEdges(vtkIdType pointId, const vtkIdType *&edgeIds) override
See vtkCell3D API for description of these methods.
represent and manipulate cell attribute data
Abstract class in support of both point location and point insertion.
void GetEdgeToAdjacentFaces(vtkIdType edgeId, const vtkIdType *&pts) override
See vtkCell3D API for description of these methods.
a cell that represents a 2D quadrilateral
std::map< vtkIdType, vtkIdType > vtkPointIdMap
dynamic, self-adjusting array of vtkIdType
virtual bool GetCentroid(double centroid[3]) const =0
Computes the centroid of the cell.
concrete dataset represents vertices, lines, polygons, and triangle strips
provides thread-safe access to cells
abstract class to specify 3D cell interface
virtual int CellBoundary(int subId, const double pcoords[3], vtkIdList *pts)=0
Given parametric coordinates of a point, return the closest cell boundary, and whether the point is i...
keep track of edges (edge is pair of integer id's)
virtual vtkIdType GetFacePoints(vtkIdType faceId, const vtkIdType *&pts)=0
Get the list of vertices that define a face.
a 3D cell that represents a tetrahedron
cell represents a 1D line
abstract class to specify cell behavior
virtual void EvaluateLocation(int &subId, const double pcoords[3], double x[3], double *weights)=0
Determine global coordinate (x[3]) from subId and parametric coordinates.
octree-based spatial search object to quickly locate cells
#define VTK_DEPRECATED_IN_9_6_0(reason)
int RequiresExplicitFaceRepresentation() VTK_FUTURE_CONST override
Satisfy the vtkCell API.
vtkIdType GetFaceToAdjacentFaces(vtkIdType faceId, const vtkIdType *&faceIds) override
See vtkCell3D API for description of these methods.
a simple class to control print indentation
virtual int TriangulateLocalIds(int index, vtkIdList *ptIds)=0
Generate simplices of proper dimension.
list of point or cell ids
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
a cell that represents an n-sided polygon
virtual void InterpolateFunctions(const double pcoords[3], double *weight)
Compute the interpolation functions/derivatives (aka shape functions/derivatives) No-ops at this leve...
vtkCellStatus
Diagnostic values indicating how well-specified a cell is.
void GetEdgePoints(vtkIdType edgeId, const vtkIdType *&pts) override
See vtkCell3D API for description of these methods.
virtual vtkCell * GetFace(int faceId)=0
Return the face cell from the faceId of the cell.
virtual int GetNumberOfEdges()=0
Return the number of edges in the cell.
virtual int EvaluatePosition(const double x[3], double closestPoint[3], int &subId, double pcoords[3], double &dist2, double weights[])=0
Given a point x[3] return inside(=1), outside(=0) cell, or (-1) computational problem encountered; ev...
object to represent cell connectivity
virtual vtkCell * GetEdge(int edgeId)=0
Return the edge cell from the edgeId of the cell.
Allocate and hold a VTK object.
a cell that represents a triangle
virtual void Derivatives(int subId, const double pcoords[3], const double *values, int dim, double *derivs)=0
Compute derivatives given cell subId and parametric coordinates.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
A 3D cell defined by a set of polygonal faces.
virtual void Initialize()
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
int IsPrimaryCell() VTK_FUTURE_CONST override
A polyhedron is a full-fledged primary cell.
virtual int GetParametricCenter(double pcoords[3])
Return center of the cell in parametric coordinates.
virtual int IntersectWithLine(const double p1[3], const double p2[3], double tol, double &t, double x[3], double pcoords[3], int &subId)=0
Intersect with a ray.
virtual vtkIdType GetPointToIncidentFaces(vtkIdType pointId, const vtkIdType *&faceIds)=0
Get the ids of the incident faces point of id pointId.
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.
int GetCellType() override
See the vtkCell API for descriptions of these methods.
vtkIdType GetPointToOneRingPoints(vtkIdType pointId, const vtkIdType *&pts) override
See vtkCell3D API for description of these methods.