Example #1
0
        /// <summary>
        /// Gets a value indicating whether this <see cref="Plane"/> intersects the specified frustum.
        /// </summary>
        /// <param name="frustum">A <see cref="BoundingFrustum"/> which represents the frustum to evaluate.</param>
        /// <param name="result">A <see cref="PlaneIntersectionType"/> value which describes the relationship between this plane and the evaluated frustum.</param>
        public void Intersects(BoundingFrustum frustum, out PlaneIntersectionType result)
        {
            Contract.Require(frustum, nameof(frustum));

            result = frustum.Intersects(this);
        }
Example #2
0
        /// <summary>
        /// Gets a value indicating whether this <see cref="Plane"/> intersects the specified frustum.
        /// </summary>
        /// <param name="frustum">A <see cref="BoundingFrustum"/> which represents the frustum to evaluate.</param>
        /// <returns>A <see cref="PlaneIntersectionType"/> value which describes the relationship between this plane and the evaluated frustum.</returns>
        public PlaneIntersectionType Intersects(BoundingFrustum frustum)
        {
            Contract.Require(frustum, nameof(frustum));

            return(frustum.Intersects(this));
        }
Example #3
0
 /// <inheritdoc/>
 public Boolean Equals(BoundingFrustum other)
 {
     return
         (this.matrix == other.matrix);
 }
        /// <summary>
        /// Converts the string representation of a <see cref="BoundingFrustum"/> to an object instance.
        /// A return value indicates whether the conversion succeeded.
        /// </summary>
        /// <param name="s">The string to convert.</param>
        /// <param name="style">A set of <see cref="NumberStyles"/> values indicating which elements are present in <paramref name="s"/>.</param>
        /// <param name="provider">A format provider that provides culture-specific formatting information.</param>
        /// <param name="v">The converted value.</param>
        /// <returns><see langword="true"/> if the conversion succeeded; otherwise, <see langword="false"/>.</returns>
        public static Boolean TryParse(String s, NumberStyles style, IFormatProvider provider, out BoundingFrustum v)
        {
            v = default(BoundingFrustum);

            if (String.IsNullOrEmpty(s))
            {
                return(false);
            }

            if (!Matrix.TryParse(s, out var matrix))
            {
                return(false);
            }

            v = new BoundingFrustum(matrix);
            return(true);
        }
 /// <summary>
 /// Converts the string representation of a <see cref="BoundingFrustum"/> to an object instance.
 /// A return value indicates whether the conversion succeeded.
 /// </summary>
 /// <param name="s">The string to convert.</param>
 /// <param name="v">The converted value.</param>
 /// <returns><see langword="true"/> if the conversion succeeded; otherwise, <see langword="false"/>.</returns>
 public static Boolean TryParse(String s, out BoundingFrustum v)
 {
     return(TryParse(s, NumberStyles.Number, NumberFormatInfo.CurrentInfo, out v));
 }
Example #6
0
        /// <summary>
        /// Determines whether this <see cref="Ray"/> intersects a specified <see cref="BoundingFrustum"/>.
        /// </summary>
        /// <param name="frustum">The <see cref="BoundingFrustum"/> to evaluate.</param>
        /// <param name="result">The distance along the ray at which it intersects the frustum, or <see langword="null"/> if there is no intersection.</param>
        public void Intersects(BoundingFrustum frustum, out Single?result)
        {
            Contract.Require(frustum, nameof(frustum));

            frustum.Intersects(ref this, out result);
        }