예제 #1
0
        public bool Includes( IBounds bounds )
        {
            bool visible = false;

            foreach ( Plane plane in planes )
            {
                if ( bounds.Intersects( plane ) != PlaneIntersectionType.Back )
                {
                    visible = true;
                    break;
                }
            }

            return visible;
        }
예제 #2
0
        public bool Includes(IBounds bounds)
        {
            bool visible = false;

            foreach (Plane plane in planes)
            {
                if (bounds.Intersects(plane) != PlaneIntersectionType.Back)
                {
                    visible = true;
                    break;
                }
            }

            return(visible);
        }
예제 #3
0
        /// <summary>
        /// Determine if bounding box is contained by frustum
        /// </summary>
        /// <param name="box">Bounding box</param>
        /// <returns>Containment type</returns>
        public ContainmentType Contains(IBounds bounds)
        {
            bool flag = false;

            foreach (Plane plane in planes)
            {
                switch (bounds.Intersects(plane))
                {
                case PlaneIntersectionType.Back: return(ContainmentType.Disjoint);

                case PlaneIntersectionType.Intersecting:
                {
                    flag = true;
                    break;
                }
                }
            }

            return(!flag ? ContainmentType.Contains : ContainmentType.Intersects);
        }
예제 #4
0
		/// <summary>
		/// Determine if bounding box is contained by frustum
		/// </summary>
		/// <param name="box">Bounding box</param>
		/// <returns>Containment type</returns>
		public ContainmentType Contains( IBounds bounds )
		{
			bool flag = false;

			foreach ( Plane plane in planes )
			{
				switch ( bounds.Intersects( plane ) )
				{
					case PlaneIntersectionType.Back: return ContainmentType.Disjoint;

					case PlaneIntersectionType.Intersecting:
					{
						flag = true;
						break;
					}
				}
			}

			return !flag ? ContainmentType.Contains : ContainmentType.Intersects;
		}