/// <summary> /// Determines if there is an intersection between the current object and a <see cref="Ray"/>. /// </summary> /// <param name="ray">The ray to test.</param> /// <returns>Whether the two objects intersected.</returns> public bool Intersects(ref Ray ray) { float distance; return(Collision.RayIntersectsSphere(ref ray, ref this, out distance)); }
/// <summary> /// Determines if there is an intersection between the current object and a <see cref="Ray"/>. /// </summary> /// <param name="ray">The ray to test.</param> /// <param name="point">When the method completes, contains the point of intersection, /// or <see cref="Vector3.Zero"/> if there was no intersection.</param> /// <returns>Whether the two objects intersected.</returns> public bool Intersects(ref Ray ray, out Vector3 point) { return(Collision.RayIntersectsSphere(ref ray, ref this, out point)); }