Hi ,
I do not have 4.10.2 nor 4.11-p3 installed at the moment as we do most work in master at the moment (we like early access ). Cross merges of our core changes take too much time so we try to avoid them where possible until we reach a stable version as well.
as for the usage of DeleteAll() and Sort() I hope this excerpt from our code is sufficient for you.
TArray<TTuple<float, ScanLineResult>> sizes;
sizes.Reserve(4);
sizes.Add(TTuple<float, ScanLineResult>( P1size, SLR1 ));
sizes.Add(TTuple<float, ScanLineResult>( P2size, SLR2 ));
sizes.Add(TTuple<float, ScanLineResult>( P3size, SLR3 ));
sizes.Add(TTuple<float, ScanLineResult>( P4size, SLR4 ));
sizes.RemoveAll([=](TTuple<float, ScanLineResult> tuple)
{
if (lhs.IsPerpendicularTo(rhs))
{
return (tuple.Get<1>().A == TIP && tuple.Get<1>().B == TIP) ||
tuple.Get<0>() > distance2;
}
else
{
return tuple.Get<1>().A != TIP ||
tuple.Get<1>().B != TIP ||
tuple.Get<0>() > distance2;
}
});
if (sizes.Num() > 0)
{
sizes.Sort([](TTuple<float, ScanLineResult> a, TTuple<float, ScanLineResult> b) {return a.Get<0>() <= b.Get<0>(); });
float shortestDistance = sizes[0].Get<0>();
ScanLineResult result = sizes[0].Get<1>();
GCPP = FGeneralClosestPointPair(result.Location_A, result.Location_B);
}
return;