Optimize BoundingFrustum::Intersects(BoundingSphere)

This commit is contained in:
Wojtek Figat
2022-10-29 21:13:21 +02:00
parent 00be6ffb89
commit f1b67935b3
4 changed files with 16 additions and 5 deletions

View File

@@ -907,6 +907,7 @@ namespace FlaxEngine
/// <param name="left">First source vector.</param>
/// <param name="right">Second source vector.</param>
/// <param name="result">When the method completes, contains the dot product of the two vectors.</param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void Dot(ref Vector3 left, ref Vector3 right, out Real result)
{
result = left.X * right.X + left.Y * right.Y + left.Z * right.Z;
@@ -918,6 +919,7 @@ namespace FlaxEngine
/// <param name="left">First source vector.</param>
/// <param name="right">Second source vector.</param>
/// <returns>The dot product of the two vectors.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Real Dot(ref Vector3 left, ref Vector3 right)
{
return left.X * right.X + left.Y * right.Y + left.Z * right.Z;
@@ -929,6 +931,7 @@ namespace FlaxEngine
/// <param name="left">First source vector.</param>
/// <param name="right">Second source vector.</param>
/// <returns>The dot product of the two vectors.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Real Dot(Vector3 left, Vector3 right)
{
return left.X * right.X + left.Y * right.Y + left.Z * right.Z;