Пример #1
0
 /// <summary>
 /// Calculates the distance between a point and a solid oriented box.
 /// </summary>
 /// <param name="point">A <see cref="Vector2F"/> instance.</param>
 /// <param name="obb">An <see cref="OrientedBox"/> instance.</param>
 /// <returns>The distance between a point and a solid oriented box.</returns>
 /// <remarks>
 /// Treating the oriented box as solid means that any point inside the box has
 /// distance zero from the box.
 /// </remarks>
 public static float Distance(Vector2F point, OrientedBox obb)
 {
     return((float)System.Math.Sqrt(SquaredDistance(point, obb)));
 }
Пример #2
0
        /// <summary>
        /// Calculates the squared distance between a point and a solid oriented box.
        /// </summary>
        /// <param name="point">A <see cref="Vector2F"/> instance.</param>
        /// <param name="obb">An <see cref="OrientedBox"/> instance.</param>
        /// <returns>The squared distance between a point and a solid oriented box.</returns>
        /// <remarks>
        /// Treating the oriented box as solid means that any point inside the box has
        /// distance zero from the box.
        /// </remarks>
        public static float SquaredDistance(Vector2F point, OrientedBox obb)
        {
            Vector2F temp;

            return(SquaredDistancePointSolidOrientedBox(point, obb, out temp));
        }
Пример #3
0
		/// <summary>
		/// Calculates the distance between a point and an oriented box.
		/// </summary>
		/// <param name="point">A <see cref="Vector2D"/> instance.</param>
		/// <param name="box">An <see cref="OrientedBox"/> instance.</param>
		/// <returns>The distance between the point and the oriented box.</returns>
		public static float Distance(Vector2D point, OrientedBox box)
		{
			throw new NotImplementedException();
		}
Пример #4
0
		/// <summary>
		/// Initializes a new instance of the <see cref="OrientedBox"/> class using given values from another box instance.
		/// </summary>
		/// <param name="box">A <see cref="OrientedBox"/> instance to take values from.</param>
		public OrientedBox(OrientedBox box)
		{
			_center = box.Center;

			_axis1 = box.Axis1;
			_axis2 = box.Axis2;

			_extent1 = box.Extent1;
			_extent2 = box.Extent2;
		}
Пример #5
0
 /// <summary>
 /// Calculates the distance between a point and an oriented box.
 /// </summary>
 /// <param name="point">A <see cref="Vector2D"/> instance.</param>
 /// <param name="box">An <see cref="OrientedBox"/> instance.</param>
 /// <returns>The distance between the point and the oriented box.</returns>
 public static float Distance(Vector2D point, OrientedBox box)
 {
     throw new NotImplementedException();
 }