예제 #1
0
 /// <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="distance">When the method completes, contains the distance of the intersection,
 /// or 0 if there was no intersection.</param>
 /// <returns>Whether the two objects intersected.</returns>
 public bool Intersects(ref Ray ray, out float distance)
 {
     return(Collision.RayIntersectsSphere(ref ray, ref this, out distance));
 }
예제 #2
0
 /// <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));
 }