TConvexHull3

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

Windows
MacOS
Linux

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

Protected variable

int32

 

Dimension

Protected variable

TArray< FIndex3...

 

Hull

Protected variable

TLine3< RealTyp...

 

Line

Protected variable

int

 

NumHullPoints

Protected variable

TPlane3< RealTy...

 

Plane

Functions

Name Description

Public function

void

 

Empty()

Empty any previously-computed convex hull data.

Public function Const

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

Public function Const

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

Public function Const

int

 

GetDimension()

Number of dimensions spanned by the input points.

Public function Const

TLine3< Real...

 

GetLine()

Public function Const

int

 

GetNumHullPoints()

Public function Const

TPlane3< Rea...

 

GetPlane()

Public function Const

TArray< FInd...

 

GetTriangles()

Public function

void

 

GetTriangles

(
    TFunctionRef< void)> Trian...
)

Call TriangleFunc for each triangle of the Convex Hull.

Public function Const

bool

 

IsSolutionAvailable()

Public function

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

Public function

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

Public function

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.
Take our survey
Dismiss