Navigation
API > API/Runtime > API/Runtime/GeometryCore
Description
Use the Sutherland–Hodgman algorithm to clip the vertices to the given bounds Note if the path/polygon is concave, this may leave overlapping edges at the boundary. Note this modifies and re-sizes the input array, so is written for TArray instead of TArrayView
| Name | UE::Geometry::CurveUtil::ClipConvexToBounds |
| Type | function |
| Header File | /Engine/Source/Runtime/GeometryCore/Public/Curve/CurveUtil.h |
| Include Path | #include "Curve/CurveUtil.h" |
namespace UE
{
namespace Geometry
{
namespace CurveUtil
{
template<typename RealType, typename VectorType, bool bLoop, int ClipDims>
static void UE::Geometry::CurveUtil::ClipConvexToBounds
(
TArray < VectorType > & Vertices,
VectorType Min,
VectorType Max
)
}
}
}
Parameters
| Name | Remarks |
|---|---|
| bLoop | Whether the path is a loop |
| ClipDims | How many dimensions of Min and Max to use for clipping (e.g. if ClipDims is 2 and the vectors are 3D, clips only vs a rectangle in X and Y) |