Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/CompGeom
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/CompGeom/ConvexHull2.h |
| Include | #include "CompGeom/ConvexHull2.h" |
Syntax
template<typename RealType>
class TConvexHull2
Variables
| Type | Name | Description | |
|---|---|---|---|
| int32 | Dimension | ||
| TArray< int32 > | Hull | ||
| int32 | NumUniquePoints |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Empty () |
Empty any previously-computed convex hull data. | |
| int32 | GetDimension () |
||
| void | GetHull
(
TFunctionRef< TVector2< RealType >(int32)> GetPointFunc, |
Divide-and-conquer algorithm | |
| TLine2< RealType > | GetLine
(
TArrayView< const TVector2< RealType >> Points |
||
| int32 | Number of unique points considered by convex hull construction (excludes exact duplicate points and filtered-out points) | ||
| TArray< int32 > const & | |||
| void | GetTangent
(
TFunctionRef< TVector2< RealType >(int32)> GetPointFunc, |
||
| bool | |||
| void | Merge
(
TFunctionRef< TVector2< RealType >(int32)> GetPointFunc, |
||
| bool | Solve
(
TArrayView< const TVector2< RealType >> Points |
Default FilterFunc version of the above Solve(); workaround for clang bug https://bugs.llvm.org/show_bug.cgi?id=25333 | |
| bool | Solve
(
TArrayView< const TVector2< RealType >> 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
(
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 collinear, or all the same point | |
| bool | SolveSimplePolygon
(
int32 NumPolygonPoints, |
Generate convex hull for a simple polygon If input has fewer than 3 points, will return false If input is not a simple polygon (e.g. if it has self-intersections), may not find a correct hull |