Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
[Mathematics] Move to namespace SharpDX.Mathematics (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed May 29, 2014
1 parent 570adaa commit 42a908b
Show file tree
Hide file tree
Showing 106 changed files with 793 additions and 702 deletions.
5 changes: 3 additions & 2 deletions Source/SharpDX.Mathematics/Angle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

using System;
using System.Runtime.InteropServices;
using System.Globalization;
using System.Runtime.InteropServices;

namespace SharpDX
namespace SharpDX.Mathematics
{
/// <summary>
/// Represents a unit independent angle using a single-precision floating-point
Expand Down
9 changes: 5 additions & 4 deletions Source/SharpDX.Mathematics/Bool4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

using System;
using System.Globalization;
using System.Runtime.InteropServices;
using SharpDX.Native;

namespace SharpDX
namespace SharpDX.Mathematics
{
/// <summary>
/// Represents a four dimensional mathematical vector of bool (32 bits per bool value).
Expand Down Expand Up @@ -346,7 +347,7 @@ public override bool Equals(object value)
}

/// <summary>
/// Performs an implicit conversion from <see cref="int"/> array to <see cref="SharpDX.Bool4"/>.
/// Performs an implicit conversion from <see cref="int"/> array to <see cref="Bool4"/>.
/// </summary>
/// <param name="input">The input.</param>
/// <returns>The result of the conversion.</returns>
Expand All @@ -356,7 +357,7 @@ public static implicit operator Bool4(bool[] input)
}

/// <summary>
/// Performs an implicit conversion from <see cref="SharpDX.Bool4"/> to <see cref="System.Int32"/> array.
/// Performs an implicit conversion from <see cref="Bool4"/> to <see cref="System.Int32"/> array.
/// </summary>
/// <param name="input">The input.</param>
/// <returns>The result of the conversion.</returns>
Expand All @@ -376,7 +377,7 @@ public unsafe static implicit operator RawBool4(Bool4 value)
}

/// <summary>
/// Performs an implicit conversion from <see cref="SharpDX.Native.RawBool4"/> to <see cref="SharpDX.Bool4"/>.
/// Performs an implicit conversion from <see cref="SharpDX.Native.RawBool4"/> to <see cref="Bool4"/>.
/// </summary>
/// <param name="value">The value.</param>
/// <returns>The result of the conversion.</returns>
Expand Down
49 changes: 25 additions & 24 deletions Source/SharpDX.Mathematics/BoundingBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

using System;
using System.Globalization;
using System.Runtime.InteropServices;

namespace SharpDX
namespace SharpDX.Mathematics
{
/// <summary>
/// Represents an axis-aligned bounding box in three dimensional space.
Expand All @@ -65,7 +66,7 @@ public struct BoundingBox : IEquatable<BoundingBox>, IFormattable
public Vector3 Maximum;

/// <summary>
/// Initializes a new instance of the <see cref="SharpDX.BoundingBox"/> struct.
/// Initializes a new instance of the <see cref="BoundingBox"/> struct.
/// </summary>
/// <param name="minimum">The minimum vertex of the bounding box.</param>
/// <param name="maximum">The maximum vertex of the bounding box.</param>
Expand Down Expand Up @@ -103,7 +104,7 @@ public void GetCorners(Vector3[] corners)
}

/// <summary>
/// Determines if there is an intersection between the current object and a <see cref="SharpDX.Ray"/>.
/// Determines if there is an intersection between the current object and a <see cref="Ray"/>.
/// </summary>
/// <param name="ray">The ray to test.</param>
/// <returns>Whether the two objects intersected.</returns>
Expand All @@ -114,7 +115,7 @@ public bool Intersects(ref Ray ray)
}

/// <summary>
/// Determines if there is an intersection between the current object and a <see cref="SharpDX.Ray"/>.
/// Determines if there is an intersection between the current object and a <see cref="Ray"/>.
/// </summary>
/// <param name="ray">The ray to test.</param>
/// <param name="distance">When the method completes, contains the distance of the intersection,
Expand All @@ -126,19 +127,19 @@ public bool Intersects(ref Ray ray, out float distance)
}

/// <summary>
/// Determines if there is an intersection between the current object and a <see cref="SharpDX.Ray"/>.
/// Determines if there is an intersection between the current object and a <see cref="Ray"/>.
/// </summary>
/// <param name="ray">The ray to test.</param>
/// <param name="point">When the method completes, contains the point of intersection,
/// or <see cref="SharpDX.Vector3.Zero"/> if there was no intersection.</param>
/// or <see cref="Vector3.Zero"/> if there was no intersection.</param>
/// <returns>Whether the two objects intersected.</returns>
public bool Intersects(ref Ray ray, out Vector3 point)
{
return Collision.RayIntersectsBox(ref ray, ref this, out point);
}

/// <summary>
/// Determines if there is an intersection between the current object and a <see cref="SharpDX.Plane"/>.
/// Determines if there is an intersection between the current object and a <see cref="Plane"/>.
/// </summary>
/// <param name="plane">The plane to test.</param>
/// <returns>Whether the two objects intersected.</returns>
Expand All @@ -162,7 +163,7 @@ public bool Intersects(ref Vector3 vertex1, ref Vector3 vertex2, ref Vector3 ver
*/

/// <summary>
/// Determines if there is an intersection between the current object and a <see cref="SharpDX.BoundingBox"/>.
/// Determines if there is an intersection between the current object and a <see cref="BoundingBox"/>.
/// </summary>
/// <param name="box">The box to test.</param>
/// <returns>Whether the two objects intersected.</returns>
Expand All @@ -172,7 +173,7 @@ public bool Intersects(ref BoundingBox box)
}

/// <summary>
/// Determines if there is an intersection between the current object and a <see cref="SharpDX.BoundingBox"/>.
/// Determines if there is an intersection between the current object and a <see cref="BoundingBox"/>.
/// </summary>
/// <param name="box">The box to test.</param>
/// <returns>Whether the two objects intersected.</returns>
Expand All @@ -182,7 +183,7 @@ public bool Intersects(BoundingBox box)
}

/// <summary>
/// Determines if there is an intersection between the current object and a <see cref="SharpDX.BoundingSphere"/>.
/// Determines if there is an intersection between the current object and a <see cref="BoundingSphere"/>.
/// </summary>
/// <param name="sphere">The sphere to test.</param>
/// <returns>Whether the two objects intersected.</returns>
Expand All @@ -192,7 +193,7 @@ public bool Intersects(ref BoundingSphere sphere)
}

/// <summary>
/// Determines if there is an intersection between the current object and a <see cref="SharpDX.BoundingSphere"/>.
/// Determines if there is an intersection between the current object and a <see cref="BoundingSphere"/>.
/// </summary>
/// <param name="sphere">The sphere to test.</param>
/// <returns>Whether the two objects intersected.</returns>
Expand Down Expand Up @@ -236,7 +237,7 @@ public ContainmentType Contains(ref Vector3 vertex1, ref Vector3 vertex2, ref Ve
*/

/// <summary>
/// Determines whether the current objects contains a <see cref="SharpDX.BoundingBox"/>.
/// Determines whether the current objects contains a <see cref="BoundingBox"/>.
/// </summary>
/// <param name="box">The box to test.</param>
/// <returns>The type of containment the two objects have.</returns>
Expand All @@ -246,7 +247,7 @@ public ContainmentType Contains(ref BoundingBox box)
}

/// <summary>
/// Determines whether the current objects contains a <see cref="SharpDX.BoundingBox"/>.
/// Determines whether the current objects contains a <see cref="BoundingBox"/>.
/// </summary>
/// <param name="box">The box to test.</param>
/// <returns>The type of containment the two objects have.</returns>
Expand All @@ -256,7 +257,7 @@ public ContainmentType Contains(BoundingBox box)
}

/// <summary>
/// Determines whether the current objects contains a <see cref="SharpDX.BoundingSphere"/>.
/// Determines whether the current objects contains a <see cref="BoundingSphere"/>.
/// </summary>
/// <param name="sphere">The sphere to test.</param>
/// <returns>The type of containment the two objects have.</returns>
Expand All @@ -266,7 +267,7 @@ public ContainmentType Contains(ref BoundingSphere sphere)
}

/// <summary>
/// Determines whether the current objects contains a <see cref="SharpDX.BoundingSphere"/>.
/// Determines whether the current objects contains a <see cref="BoundingSphere"/>.
/// </summary>
/// <param name="sphere">The sphere to test.</param>
/// <returns>The type of containment the two objects have.</returns>
Expand All @@ -276,7 +277,7 @@ public ContainmentType Contains(BoundingSphere sphere)
}

/// <summary>
/// Constructs a <see cref="SharpDX.BoundingBox"/> that fully contains the given points.
/// Constructs a <see cref="BoundingBox"/> that fully contains the given points.
/// </summary>
/// <param name="points">The points that will be contained by the box.</param>
/// <param name="result">When the method completes, contains the newly constructed bounding box.</param>
Expand All @@ -299,7 +300,7 @@ public static void FromPoints(Vector3[] points, out BoundingBox result)
}

/// <summary>
/// Constructs a <see cref="SharpDX.BoundingBox"/> that fully contains the given points.
/// Constructs a <see cref="BoundingBox"/> that fully contains the given points.
/// </summary>
/// <param name="points">The points that will be contained by the box.</param>
/// <returns>The newly constructed bounding box.</returns>
Expand All @@ -322,7 +323,7 @@ public static BoundingBox FromPoints(Vector3[] points)
}

/// <summary>
/// Constructs a <see cref="SharpDX.BoundingBox"/> from a given sphere.
/// Constructs a <see cref="BoundingBox"/> from a given sphere.
/// </summary>
/// <param name="sphere">The sphere that will designate the extents of the box.</param>
/// <param name="result">When the method completes, contains the newly constructed bounding box.</param>
Expand All @@ -333,7 +334,7 @@ public static void FromSphere(ref BoundingSphere sphere, out BoundingBox result)
}

/// <summary>
/// Constructs a <see cref="SharpDX.BoundingBox"/> from a given sphere.
/// Constructs a <see cref="BoundingBox"/> from a given sphere.
/// </summary>
/// <param name="sphere">The sphere that will designate the extents of the box.</param>
/// <returns>The newly constructed bounding box.</returns>
Expand All @@ -346,7 +347,7 @@ public static BoundingBox FromSphere(BoundingSphere sphere)
}

/// <summary>
/// Constructs a <see cref="SharpDX.BoundingBox"/> that is as large as the total combined area of the two specified boxes.
/// Constructs a <see cref="BoundingBox"/> that is as large as the total combined area of the two specified boxes.
/// </summary>
/// <param name="value1">The first box to merge.</param>
/// <param name="value2">The second box to merge.</param>
Expand All @@ -358,7 +359,7 @@ public static void Merge(ref BoundingBox value1, ref BoundingBox value2, out Bou
}

/// <summary>
/// Constructs a <see cref="SharpDX.BoundingBox"/> that is as large as the total combined area of the two specified boxes.
/// Constructs a <see cref="BoundingBox"/> that is as large as the total combined area of the two specified boxes.
/// </summary>
/// <param name="value1">The first box to merge.</param>
/// <param name="value2">The second box to merge.</param>
Expand Down Expand Up @@ -464,11 +465,11 @@ public override int GetHashCode()
}

/// <summary>
/// Determines whether the specified <see cref="SharpDX.Vector4"/> is equal to this instance.
/// Determines whether the specified <see cref="Vector4"/> is equal to this instance.
/// </summary>
/// <param name="value">The <see cref="SharpDX.Vector4"/> to compare with this instance.</param>
/// <param name="value">The <see cref="Vector4"/> to compare with this instance.</param>
/// <returns>
/// <c>true</c> if the specified <see cref="SharpDX.Vector4"/> is equal to this instance; otherwise, <c>false</c>.
/// <c>true</c> if the specified <see cref="Vector4"/> is equal to this instance; otherwise, <c>false</c>.
/// </returns>
public bool Equals(BoundingBox value)
{
Expand Down
3 changes: 2 additions & 1 deletion Source/SharpDX.Mathematics/BoundingFrustum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

using System;
using System.Runtime.InteropServices;

namespace SharpDX
namespace SharpDX.Mathematics
{
/// <summary>
/// Defines a frustum which can be used in frustum culling, zoom to Extents (zoom to fit) operations,
Expand Down
Loading

0 comments on commit 42a908b

Please sign in to comment.