コード例 #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="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(CollisionsHelper.RayIntersectsPlane(ref ray, ref this, out point));
 }
コード例 #2
0
 /// <summary>
 /// Determines if there is an intersection between the current object and a <see cref="Plane" />.
 /// </summary>
 /// <param name="plane">The plane to test.</param>
 /// <param name="line">
 /// When the method completes, contains the line of intersection
 /// as a <see cref="Ray" />, or a zero ray if there was no intersection.
 /// </param>
 /// <returns>Whether the two objects intersected.</returns>
 public bool Intersects(ref Plane plane, out Ray line)
 {
     return(CollisionsHelper.PlaneIntersectsPlane(ref this, ref plane, out line));
 }
コード例 #3
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(CollisionsHelper.RayIntersectsPlane(ref ray, ref this, out distance));
 }