remove monogame dependency
parent
ff88d21a44
commit
fc544945fd
|
@ -1,7 +1,6 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.Xna.Framework;
|
using System.Numerics;
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
|
|
||||||
namespace MoonTools.Core.Bonk
|
namespace MoonTools.Core.Bonk
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>2.1.1</Version>
|
<Version>2.1.1</Version>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<Description>.NET Core Collision Detection for MonoGame</Description>
|
<Description>.NET Core Collision Detection for MonoGame</Description>
|
||||||
<PackageId>MoonTools.Core.Bonk</PackageId>
|
<PackageId>MoonTools.Core.Bonk</PackageId>
|
||||||
<RootNamespace>MoonTools.Core.Bonk</RootNamespace>
|
<RootNamespace>MoonTools.Core.Bonk</RootNamespace>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<PackageProjectUrl>https://github.com/MoonsideGames/MoonTools.Core.Bonk</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/MoonsideGames/MoonTools.Core.Bonk</PackageProjectUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MoonTools.Core.Structs" Version="1.1.0"/>
|
<PackageReference Include="MoonTools.Core.Structs" Version="2.0.0"/>
|
||||||
<PackageReference Include="morelinq" Version="3.2.0"/>
|
<PackageReference Include="morelinq" Version="3.2.0"/>
|
||||||
<PackageReference Include="Collections.Pooled" Version="1.0.82"/>
|
<PackageReference Include="Collections.Pooled" Version="1.0.82"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.Xna.Framework;
|
using System.Numerics;
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
|
|
||||||
namespace MoonTools.Core.Bonk
|
namespace MoonTools.Core.Bonk
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.Xna.Framework;
|
using System.Numerics;
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
|
|
||||||
namespace MoonTools.Core.Bonk
|
namespace MoonTools.Core.Bonk
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using Collections.Pooled;
|
using Collections.Pooled;
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Numerics;
|
||||||
|
|
||||||
namespace MoonTools.Core.Bonk
|
namespace MoonTools.Core.Bonk
|
||||||
{
|
{
|
||||||
|
@ -79,13 +79,12 @@ namespace MoonTools.Core.Bonk
|
||||||
Vector2 norm;
|
Vector2 norm;
|
||||||
if (winding == PolygonWinding.Clockwise)
|
if (winding == PolygonWinding.Clockwise)
|
||||||
{
|
{
|
||||||
norm = new Vector2(edge.Y, -edge.X);
|
norm = Vector2.Normalize(new Vector2(edge.Y, -edge.X));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
norm = new Vector2(-edge.Y, edge.X);
|
norm = Vector2.Normalize(new Vector2(-edge.Y, edge.X));
|
||||||
}
|
}
|
||||||
norm.Normalize();
|
|
||||||
|
|
||||||
var dist = Vector2.Dot(norm, simplexVertices[i]);
|
var dist = Vector2.Dot(norm, simplexVertices[i]);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using Microsoft.Xna.Framework;
|
using System.Numerics;
|
||||||
|
|
||||||
namespace MoonTools.Core.Bonk
|
namespace MoonTools.Core.Bonk
|
||||||
{
|
{
|
||||||
|
@ -8,7 +8,8 @@ namespace MoonTools.Core.Bonk
|
||||||
public Vector2 normal;
|
public Vector2 normal;
|
||||||
public int index;
|
public int index;
|
||||||
|
|
||||||
public Edge(float distance, Vector2 normal, int index) {
|
public Edge(float distance, Vector2 normal, int index)
|
||||||
|
{
|
||||||
this.distance = distance;
|
this.distance = distance;
|
||||||
this.normal = normal;
|
this.normal = normal;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using Microsoft.Xna.Framework;
|
using MoonTools.Core.Structs;
|
||||||
using MoonTools.Core.Structs;
|
|
||||||
using MoonTools.Core.Bonk.Extensions;
|
using MoonTools.Core.Bonk.Extensions;
|
||||||
|
using System.Numerics;
|
||||||
|
|
||||||
namespace MoonTools.Core.Bonk
|
namespace MoonTools.Core.Bonk
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.Xna.Framework;
|
using System.Numerics;
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
|
|
||||||
namespace MoonTools.Core.Bonk
|
namespace MoonTools.Core.Bonk
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.Xna.Framework;
|
using System.Numerics;
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
|
|
||||||
namespace MoonTools.Core.Bonk
|
namespace MoonTools.Core.Bonk
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Numerics;
|
||||||
using Collections.Pooled;
|
using Collections.Pooled;
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
using MoreLinq;
|
using MoreLinq;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.Xna.Framework;
|
using System.Numerics;
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
using MoreLinq;
|
using MoreLinq;
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.Xna.Framework;
|
using System.Numerics;
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
using MoonTools.Core.Bonk.Extensions;
|
|
||||||
using MoreLinq;
|
using MoreLinq;
|
||||||
|
|
||||||
namespace MoonTools.Core.Bonk
|
namespace MoonTools.Core.Bonk
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
using Microsoft.Xna.Framework;
|
using System.Numerics;
|
||||||
|
|
||||||
namespace MoonTools.Core.Bonk.Extensions
|
namespace MoonTools.Core.Bonk.Extensions
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Numerics;
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
using MoonTools.Core.Bonk;
|
using MoonTools.Core.Bonk;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ using FluentAssertions;
|
||||||
|
|
||||||
using MoonTools.Core.Bonk;
|
using MoonTools.Core.Bonk;
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
using Microsoft.Xna.Framework;
|
using System.Numerics;
|
||||||
|
|
||||||
namespace Tests
|
namespace Tests
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using MoonTools.Core.Bonk;
|
using MoonTools.Core.Bonk;
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
using Microsoft.Xna.Framework;
|
using System.Numerics;
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
|
|
||||||
namespace Tests
|
namespace Tests
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using FluentAssertions;
|
using FluentAssertions;
|
||||||
using Microsoft.Xna.Framework;
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using MoonTools.Core.Structs;
|
using MoonTools.Core.Structs;
|
||||||
using MoonTools.Core.Bonk;
|
using MoonTools.Core.Bonk;
|
||||||
|
using System.Numerics;
|
||||||
|
|
||||||
namespace Tests
|
namespace Tests
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue