Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Kismet > API/Runtime/Engine/Kismet/UKismetMathLibrary
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.h |
| Include | #include "Kismet/KismetMathLibrary.h" |
| Source | /Engine/Source/Runtime/Engine/Private/KismetMathLibrary.cpp |
static void MinAreaRectangle
&40;
UObject &42; WorldContextObject,
const TArray< FVector > & InPoints,
const FVector & SampleSurfaceNormal,
FVector & OutRectCenter,
FRotator & OutRectRotation,
float & OutRectLengthX,
float & OutRectLengthY,
bool bDebugDraw
&41;
Remarks
Finds the minimum area rectangle that encloses a set of coplanar points. Uses the exhaustive search algorithm in http://www.geometrictools.com/Documentation/MinimumAreaRectangle.pdf
Parameters
| Name | Description |
|---|---|
| WorldContextObject | Pointer to world context; only used when debug draw is enabled |
| InPoints | Points to enclose in the rectangle; need to be within the same plane for correct results |
| SampleSurfaceNormal | Normal indicating the surface direction for the points |
| OutRectCenter | Translation for the output rectangle from the origin |
| OutRectRotation | Rotation for the output rectangle from the XY plane |
| OutRectLengthX | Length of the output rectangle along the X axis before rotation |
| OutRectLengthY | Length of the output rectangle along the Y axis before rotation |
| bDebugDraw | Draws the output rectangle for debugging purposes provided the world context is set as well |