コード例 #1
0
ファイル: Ray.cs プロジェクト: vvvv/stride
 /// <summary>
 /// Determines if there is an intersection between the current object and a <see cref="Stride.Core.Mathematics.BoundingSphere"/>.
 /// </summary>
 /// <param name="sphere">The sphere to test.</param>
 /// <param name="point">When the method completes, contains the point of intersection,
 /// or <see cref="Stride.Core.Mathematics.Vector3.Zero"/> if there was no intersection.</param>
 /// <returns>Whether the two objects intersected.</returns>
 public bool Intersects(ref BoundingSphere sphere, out Vector3 point)
 {
     return(CollisionHelper.RayIntersectsSphere(ref this, ref sphere, out point));
 }
コード例 #2
0
ファイル: Ray.cs プロジェクト: vvvv/stride
 /// <summary>
 /// Determines if there is an intersection between the current object and a <see cref="Stride.Core.Mathematics.BoundingSphere"/>.
 /// </summary>
 /// <param name="sphere">The sphere 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 BoundingSphere sphere, out float distance)
 {
     return(CollisionHelper.RayIntersectsSphere(ref this, ref sphere, out distance));
 }