UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::CubicBezier Namespace Reference

Functions

FVector Eval (const FVector &P0, const FVector &P1, const FVector &P2, const FVector &P3, const float t)
 
FVector EvalDerivate (const FVector &P0, const FVector &P1, const FVector &P2, const FVector &P3, const float t)
 
ENGINE_API void SplitAt (const FVector &P0, const FVector &P1, const FVector &P2, const FVector &P3, const float t, FVector OutResult[5])
 
ENGINE_API FBox CalcBounds (const FVector &P0, const FVector &P1, const FVector &P2, const FVector &P3)
 
ENGINE_API void ClosestPointApproximate (const FVector &FromPoint, const FVector &P0, const FVector &P1, const FVector &P2, const FVector &P3, FVector &OutClosestPoint, float &OutClosestT, const int Steps=16)
 
ENGINE_API void SegmentClosestPointApproximate (const FVector &SegStart, const FVector &SegEnd, const FVector &P0, const FVector &P1, const FVector &P2, const FVector &P3, FVector &OutClosestPoint, float &OutClosestT, const int Steps=16)
 
ENGINE_API float ArcLengthApproximate (const FVector &P0, const FVector &P1, const FVector &P2, const FVector &P3)
 
ENGINE_API void Tessellate (TArray< FVector > &Output, const FVector &P0, const FVector &P1, const FVector &P2, const FVector &P3, const float Tolerance, const int MaxLevel=6)
 
void TessellateRecursive (TArray< FVector > &Output, const FVector &P0, const FVector &P1, const FVector &P2, const FVector &P3, const float ToleranceSqr, int Level, const int MaxLevel)
 

Function Documentation

◆ ArcLengthApproximate()

float UE::CubicBezier::ArcLengthApproximate ( const FVector P0,
const FVector P1,
const FVector P2,
const FVector P3 
)

Returns approximate arc length of cubic bezier. The length is calculated based on control point hull with one subdivision.

◆ CalcBounds()

FBox UE::CubicBezier::CalcBounds ( const FVector P0,
const FVector P1,
const FVector P2,
const FVector P3 
)

Returns bounding box of cubic bezier curve.

◆ ClosestPointApproximate()

void UE::CubicBezier::ClosestPointApproximate ( const FVector FromPoint,
const FVector P0,
const FVector P1,
const FVector P2,
const FVector P3,
FVector OutClosestPoint,
float OutClosestT,
const int  Steps = 16 
)

Returns closest point to cubic bezier segment. The curve is split to up to Steps linear segments for approximate calculation.

◆ Eval()

FVector UE::CubicBezier::Eval ( const FVector P0,
const FVector P1,
const FVector P2,
const FVector P3,
const float  t 
)
inline

Evaluates cubic bezier value at specified time

◆ EvalDerivate()

FVector UE::CubicBezier::EvalDerivate ( const FVector P0,
const FVector P1,
const FVector P2,
const FVector P3,
const float  t 
)
inline

Evaluates cubic bezier derivative at specified time

◆ SegmentClosestPointApproximate()

void UE::CubicBezier::SegmentClosestPointApproximate ( const FVector SegStart,
const FVector SegEnd,
const FVector P0,
const FVector P1,
const FVector P2,
const FVector P3,
FVector OutClosestPoint,
float OutClosestT,
const int  Steps = 16 
)

Returns closest point between a linear segment and cubic bezier segment. The curve is split to up to Steps linear segments for approximate calculation.

◆ SplitAt()

void UE::CubicBezier::SplitAt ( const FVector P0,
const FVector P1,
const FVector P2,
const FVector P3,
const float  t,
FVector  OutResult[5] 
)

Splits cubic bezier curve at specified time, returns new points. The new curves are (P0, Result[0], Result[1], Result[2]) and (P0, Result[2], Result[3], Result[4], P3)

◆ Tessellate()

void UE::CubicBezier::Tessellate ( TArray< FVector > &  Output,
const FVector P0,
const FVector P1,
const FVector P2,
const FVector P3,
const float  Tolerance,
const int  MaxLevel = 6 
)

Recursively tessellate a bezier curve until the segments are within Tolerance from the curve, or until max recursion level is reached. Output will contain points describing linear segments of the flattened curve. Note that the points are appended, and that the first point is omitted so that the function can be used to flatten a bezier shape.

◆ TessellateRecursive()

void UE::CubicBezier::TessellateRecursive ( TArray< FVector > &  Output,
const FVector P0,
const FVector P1,
const FVector P2,
const FVector P3,
const float  ToleranceSqr,
int  Level,
const int  MaxLevel 
)