TConvexHull3

Calculate the Convex Hull of a 3D point set as a Triangle Mesh

References

 Module GeometryAlgorithms Header /Engine/Plugins/Experimental/GeometryProcessing/Source/GeometryAlgorithms/Public/ConvexHull3.h Include #include "ConvexHull3.h"

Syntax

template<typename RealType>
class TConvexHull3

Remarks

Calculate the Convex Hull of a 3D point set as a Triangle Mesh

Variables

Name Description

int32

Dimension

TArray< FIndex3...

Hull

TLine3< RealTyp...

Line

int

NumHullPoints

TPlane3< RealTy...

Plane

Functions

Name Description

void

Empty()

Empty any previously-computed convex hull data.

TArray< THal...

GetAsHalfspaces

(
TArrayView< const FVector3< RealTyp...
)

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< THal...

GetAsHalfspaces

(
TFunctionRef< FVector3< RealType >(...
)

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.

TLine3< Real...

GetLine()

int

GetNumHullPoints()

TPlane3< Rea...

GetPlane()

TArray< FInd...

GetTriangles()

void

GetTriangles

(
TFunctionRef< void)> Trian...
)

Call TriangleFunc for each triangle of the Convex Hull.

bool

IsSolutionAvailable()

bool

Solve

(
TArrayView< const FVector3< RealTyp...
)

Default FilterFunc version of the above Solve(); workaround for clang bug https://bugs.llvm.org/show_bug.cgi?id=25333

bool

Solve

(
TArrayView< const FVector3< RealTyp...,
TFunctionRef< bool)> FilterFu...
)

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

(
int32 NumPoints,
TFunctionRef< FVector3< RealType >(...,
TFunctionRef< bool)> FilterFu...
)

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

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.