28#ifndef vtkConvexHull_h
29#define vtkConvexHull_h
31#include "vtkFiltersCoreModule.h"
38VTK_ABI_NAMESPACE_BEGIN
63 vtkSetClampMacro(Dimension,
int, 1, 3);
64 vtkGetMacro(Dimension,
int);
73 vtkSetMacro(GeneratePolyData,
bool);
74 vtkGetMacro(GeneratePolyData,
bool);
75 vtkBooleanMacro(GeneratePolyData,
bool);
90 const vtkVector3d& p,
const std::vector<Plane>& planes,
double tol = 1e-8);
105 const vtkVector3d* points,
int numPoints,
int dimension, std::vector<Plane>& planes);
119 bool GeneratePolyData{
true };
120 std::vector<Plane> HullPlanes;
122 static void Compute1D(
123 const vtkVector3d* pts,
vtkIdType n, std::vector<Plane>& planes, vtkPolyData* geom);
124 static void Compute2D(
125 const vtkVector3d* pts,
vtkIdType n, std::vector<Plane>& planes, vtkPolyData* geom);
126 static void Compute3D(
127 const vtkVector3d* pts,
vtkIdType n, std::vector<Plane>& planes, vtkPolyData* geom);
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool IsPointWithinConvexHull(const double point[3], double tol=1e-8) const
static void ComputeConvexHull(vtkDataArray *points, int dimension, std::vector< Plane > &planes)
Compute the convex hull of the points in points (a vtkDataArray with 3 components) for the given dime...
static void ComputeConvexHull(const vtkVector3d *points, int numPoints, int dimension, std::vector< Plane > &planes)
Compute the convex hull of numPoints points stored in points for the given dimension and write the ha...
static vtkConvexHull * New()
~vtkConvexHull() override=default
bool IsPointWithinConvexHull(double x, double y, double z, double tol=1e-8) const
Return true iff the point (x, y, z) lies inside (or on the boundary of) the hull computed by the most...
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static bool IsPointInside(const vtkVector3d &p, const std::vector< Plane > &planes, double tol=1e-8)
Return true iff p lies inside (or on the boundary of) the given half-planes.
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
a simple class to control print indentation
concrete dataset represents vertices, lines, polygons, and triangle strips
Half-plane representation: point P is inside the hull iff P·Normal ≤ D for every plane in the set.