Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/CompGeom
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/CompGeom/ConvexHull3.h |
| Include | #include "CompGeom/ConvexHull3.h" |
Syntax
template<typename RealType>
class TConvexHull3
Remarks
Calculate the Convex Hull of a 3D point set as a Triangle Mesh
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bSaveTriangleNeighbors | Whether neighbors for the hull triangles should be computed/saved. | |
| int32 | Dimension | ||
| TArray< FIndex3i > | Hull | ||
| TArray< FIndex3i > | HullNeighbors | We can optionally also return the hull triangle adjacencies. | |
| TLine3< RealType > | Line | ||
| int | NumHullPoints | ||
| TPlane3< RealType > | Plane | ||
| FProgressCancel * | Progress | Set this to be able to cancel running operation |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Empty () |
Empty any previously-computed convex hull data. | |
| TArray< THalfspace3< RealType > > | GetAsHalfspaces
(
TArrayView< const VectorType > Points |
Convert an already-computed convex hull into a halfspace representation Following the logic of ContainmentQueries3.h, all halfspaces are oriented "outwards," so a point is inside the convex hull if it is outside of all halfspaces in the array | |
| TArray< THalfspace3< RealType > > | GetAsHalfspaces
(
TFunctionRef< VectorType(int32)> GetPointFunc |
Convert an already-computed convex hull into a halfspace representation Following the logic of ContainmentQueries3.h, all halfspaces are oriented "outwards," so a point is inside the convex hull if it is outside of all halfspaces in the array | |
| int | GetDimension () |
Number of dimensions spanned by the input points. | |
| void | GetFaces
(
TFunctionRef< void(TArray< int32 >&, TVector< RealType >)> PolygonFunc, |
Get faces of the convex hull as convex polygons | |
| TLine3< RealType > const & | GetLine () |
||
| int | |||
| TPlane3< RealType > const & | GetPlane () |
||
| TArray< FIndex3i > const & | Only valid if bSaveTriangleNeighbors was true when Solve() was called | ||
| void | GetTriangles
(
TFunctionRef< void(FIndex3i)> TriangleFunc |
Call TriangleFunc for each triangle of the Convex Hull. | |
| TArray< FIndex3i > const & | GetTriangles () |
||
| bool | |||
| TArray< FIndex3i > && | |||
| bool | Solve
(
TArrayView< const VectorType > Points, |
Generate convex hull as long as input is not degenerate If input is degenerate, this will return false, and caller can call GetDimension() to determine whether the points were collinear, or all the same point | |
| bool | Solve
(
TArrayView< const VectorType > Points |
Default FilterFunc version of the above Solve(); workaround for clang bug https://bugs.llvm.org/show_bug.cgi?id=25333 | |
| bool | Solve
(
int32 NumPoints, |
Generate convex hull as long as input is not degenerate If input is degenerate, this will return false, and caller can call GetDimension() to determine whether the points were coplanar, collinear, or all the same point | |
| void | WalkBorder
(
const TArray< FIndex3i >& Triangles, |
Useful helper for walking the border of a convex region, or of a QHull horizon. |