float3 Capsule::ExtremePoint(const float3 &direction) const { return (Dot(direction, l.b - l.a) >= 0.f ? l.b : l.a) + direction.ScaledToLength(r); }
float3 Sphere::ExtremePoint(const float3 &direction) const { return pos + direction.ScaledToLength(r); }