Navigation
API > API/Runtime > API/Runtime/GeometryCore
Description
Use the rotating calipers algorithm to find a best-fit oriented bounding box of a point set. Note it internally computes a 2D convex hull of a point set, and is currently O(n log n) in the number of points.
| Name | UE::Geometry::FitOrientedBox2Points |
| Type | function |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/CompGeom/FitOrientedBox2.h |
| Include Path | #include "CompGeom/FitOrientedBox2.h" |
namespace UE
{
namespace Geometry
{
template<typename RealType>
TOrientedBox2 < RealType > UE::Geometry::FitOrientedBox2Points
(
TArrayView < const TVector2 < RealType > > Points,
EBox2FitCriteria FitMethod
)
}
}
A best-fit TOrientedBox2 that contains the points
Parameters
| Name | Remarks |
|---|---|
| Points | The points to fit |
| FitMethod | What criteria to optimize |