コード例 #1
0
        /// <summary>
        /// Checks whether the current BoundingSphere intersects with a specified BoundingFrustum.
        /// </summary>
        /// <param name="frustum">The BoundingFrustum to check for intersection with the current BoundingSphere.</param>
        public bool Intersects(BoundingFrustum frustum)
        {
            bool result;

            frustum.Intersects(ref this, out result);
            return(result);
        }
コード例 #2
0
        public bool Intersects(BoundingFrustum frustum)
        {
            bool flag;

            frustum.Intersects(ref this, out flag);
            return(flag);
        }
コード例 #3
0
 /// <summary>
 /// Checks whether the current BoundingBox intersects a BoundingFrustum.
 /// </summary>
 /// <param name="frustum">The BoundingFrustum to check for intersection with.</param>
 public bool Intersects(BoundingFrustum frustum)
 {
     if ((BoundingFrustum)null == frustum)
     {
         throw new ArgumentNullException("frustum");
     }
     else
     {
         return(frustum.Intersects(this));
     }
 }
コード例 #4
0
ファイル: Ray.cs プロジェクト: tkottke90/SpaceEngineersDrone
 /// <summary>
 /// Checks whether the Ray intersects a specified BoundingFrustum.
 /// </summary>
 /// <param name="frustum">The BoundingFrustum to check for intersection with the Ray.</param>
 public float?Intersects(BoundingFrustum frustum)
 {
     if (frustum == (BoundingFrustum)null)
     {
         throw new ArgumentNullException("frustum");
     }
     else
     {
         return(frustum.Intersects(this));
     }
 }
コード例 #5
0
 /// <summary>
 /// Tests whether the BoundingBox contains a BoundingFrustum.
 /// </summary>
 /// <param name="frustum">The BoundingFrustum to test for overlap.</param>
 public ContainmentType Contains(BoundingFrustum frustum)
 {
     if (!frustum.Intersects(this))
     {
         return(ContainmentType.Disjoint);
     }
     foreach (Vector3 point in frustum.cornerArray)
     {
         if (this.Contains(point) == ContainmentType.Disjoint)
         {
             return(ContainmentType.Intersects);
         }
     }
     return(ContainmentType.Contains);
 }
コード例 #6
0
        /// <summary>
        /// Checks whether the current BoundingSphere contains the specified BoundingFrustum.
        /// </summary>
        /// <param name="frustum">The BoundingFrustum to check against the current BoundingSphere.</param>
        public ContainmentType Contains(BoundingFrustum frustum)
        {
            if (!frustum.Intersects(this))
            {
                return(ContainmentType.Disjoint);
            }
            float num = this.Radius * this.Radius;

            foreach (Vector3 vector3_1 in frustum.cornerArray)
            {
                Vector3 vector3_2;
                vector3_2.X = vector3_1.X - this.Center.X;
                vector3_2.Y = vector3_1.Y - this.Center.Y;
                vector3_2.Z = vector3_1.Z - this.Center.Z;
                if ((double)vector3_2.LengthSquared() > (double)num)
                {
                    return(ContainmentType.Intersects);
                }
            }
            return(ContainmentType.Contains);
        }
コード例 #7
0
 public float?Intersects(BoundingFrustum frustum) =>
 frustum?.Intersects(this);
コード例 #8
0
 /// <summary>
 /// Checks whether the current Plane intersects a specified BoundingFrustum.
 /// </summary>
 /// <param name="frustum">The BoundingFrustum to check for intersection with.</param>
 public PlaneIntersectionType Intersects(BoundingFrustum frustum)
 {
     return(frustum.Intersects(this));
 }
コード例 #9
0
ファイル: Plane.cs プロジェクト: Fullance/space-egineers-API
 public PlaneIntersectionType Intersects(BoundingFrustum frustum) =>
 frustum.Intersects(this);