/// <summary> /// Calculates the distance between a point and a solid oriented box. /// </summary> /// <param name="point">A <see cref="Vector3"/> 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 double Distance(Vector3 point, OrientedBox obb) { return((double)System.Math.Sqrt(SquaredDistance(point, obb))); }
/// <summary> /// Calculates the squared distance between a point and a solid oriented box. /// </summary> /// <param name="point">A <see cref="Vector3"/> 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 double SquaredDistance(Vector3 point, OrientedBox obb) { Vector3 temp; return(SquaredDistancePointSolidOrientedBox(point, obb, out temp)); }
/// <summary> /// Tests for intersection between an <see cref="AxisAlignedBox"/> and an <see cref="OrientedBox"/> . /// </summary> /// <param name="box1">An <see cref="AxisAlignedBox"/> instance.</param> /// <param name="box2">An <see cref="OrientedBox"/> instance.</param> /// <returns>An <see cref="IntersectionType"/> value.</returns> public static IntersectionType Intersects(AxisAlignedBox box1, OrientedBox box2) { // TODO: Implement this. throw new NotImplementedException(); }
/// <summary> /// Tests for intersection between a <see cref="Sphere"/> and an <see cref="OrientedBox"/> . /// </summary> /// <param name="sphere">A <see cref="Sphere"/> instance.</param> /// <param name="box">An <see cref="OrientedBox"/> instance.</param> /// <returns>An <see cref="IntersectionType"/> value.</returns> public static IntersectionType Intersects(Sphere sphere, OrientedBox box) { // TODO: Implement this. throw new NotImplementedException(); }
/// <summary> /// Tests for intersection between a <see cref="Ray"/> and an <see cref="OrientedBox">oriented box</see>. /// </summary> /// <param name="ray">A <see cref="Ray"/> instance.</param> /// <param name="obb">A <see cref="OrientedBox"/> instance.</param> /// <returns>An <see cref="IntersectionPair"/> instance containing the intersection information.</returns> public static IntersectionPair Intersects(Ray ray, OrientedBox obb) { // TODO: Implement this. throw new NotImplementedException(); }