Compare commits

...

4 Commits

Author SHA1 Message Date
cosmonaut c7fa0932d6 update drone
continuous-integration/drone/push Build is passing Details
2021-01-04 23:41:19 -08:00
cosmonaut e57bae4c44 bump immutable collections
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
2020-12-21 14:30:40 -08:00
cosmonaut 094cf4b3d2 specify x64
continuous-integration/drone/push Build is passing Details
2020-11-22 16:54:28 -08:00
Evan Hemsley e6bab0de5e some minor cleanups
continuous-integration/drone/push Build is passing Details
2020-07-18 13:19:36 -07:00
8 changed files with 19 additions and 13 deletions

View File

@ -26,11 +26,13 @@ namespace MoonTools.Bonk
public float Right { get { return Max.X; } } public float Right { get { return Max.X; } }
public float Left { get { return Min.X; } } public float Left { get { return Min.X; } }
/// <summary> /// <summary>
/// The top of the AABB. Assumes a downward-aligned Y axis, so this value will be smaller than Bottom. /// The top of the AABB. Assumes a downward-aligned Y axis, so this value will be smaller than Bottom.
/// </summary> /// </summary>
/// <value></value> /// <value></value>
public float Top { get { return Min.Y; } } public float Top { get { return Min.Y; } }
/// <summary> /// <summary>
/// The bottom of the AABB. Assumes a downward-aligned Y axis, so this value will be larger than Top. /// The bottom of the AABB. Assumes a downward-aligned Y axis, so this value will be larger than Top.
/// </summary> /// </summary>

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<Version>8.0.0</Version> <Version>8.0.1</Version>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<Description>.NET Standard High Performance Collision Detection</Description> <Description>.NET Standard High Performance Collision Detection</Description>
<PackageId>MoonTools.Bonk</PackageId> <PackageId>MoonTools.Bonk</PackageId>
@ -14,15 +14,16 @@
<PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression> <PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression>
<PackageProjectUrl>https://gitea.moonside.games/MoonsideGames/MoonTools.Bonk</PackageProjectUrl> <PackageProjectUrl>https://gitea.moonside.games/MoonsideGames/MoonTools.Bonk</PackageProjectUrl>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>x64</Platforms>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8"> <PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="System.Collections.Immutable" Version="1.7.0"/> <PackageReference Include="System.Collections.Immutable" Version="1.7.1" />
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0"/> <PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.0"/> <PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.0" />
<PackageReference Include="MoonTools.Structs" Version="3.0.1"/> <PackageReference Include="MoonTools.Structs" Version="3.0.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -60,7 +60,7 @@ namespace MoonTools.Bonk
} }
/// <summary> /// <summary>
/// Tests if a multishape-transform and shape-transform pair are overlapping. /// Tests if a multishape-transform and shape-transform pair are overlapping.
/// Note that this must perform pairwise comparison so the worst-case performance of this method will vary inversely with the amount of shapes in the multishape. /// Note that this must perform pairwise comparison so the worst-case performance of this method will vary inversely with the amount of shapes in the multishape.
/// </summary> /// </summary>
/// <param name="multiShape"></param> /// <param name="multiShape"></param>
@ -78,7 +78,7 @@ namespace MoonTools.Bonk
} }
/// <summary> /// <summary>
/// Tests if a multishape-transform and shape-transform pair are overlapping. /// Tests if a multishape-transform and shape-transform pair are overlapping.
/// Note that this must perform pairwise comparison so the worst-case performance of this method will vary inversely with the amount of shapes in the multishape. /// Note that this must perform pairwise comparison so the worst-case performance of this method will vary inversely with the amount of shapes in the multishape.
/// </summary> /// </summary>
/// <param name="multiShape"></param> /// <param name="multiShape"></param>
@ -96,7 +96,7 @@ namespace MoonTools.Bonk
} }
/// <summary> /// <summary>
/// Tests if two multishape-transform pairs are overlapping. /// Tests if two multishape-transform pairs are overlapping.
/// Note that this must perform pairwise comparison so the worst-case performance of this method will vary inversely with the amount of shapes in the multishapes. /// Note that this must perform pairwise comparison so the worst-case performance of this method will vary inversely with the amount of shapes in the multishapes.
/// </summary> /// </summary>
/// <param name="multiShapeA"></param> /// <param name="multiShapeA"></param>

View File

@ -4,6 +4,9 @@ using MoonTools.Structs;
namespace MoonTools.Bonk namespace MoonTools.Bonk
{ {
/// <summary>
/// A Point is "that which has not part". All points by themselves are identical.
/// </summary>
public struct Point : IShape2D, IEquatable<Point> public struct Point : IShape2D, IEquatable<Point>
{ {
public AABB AABB { get; } public AABB AABB { get; }

View File

@ -59,7 +59,7 @@ namespace MoonTools.Bonk
public bool Equals(IShape2D other) public bool Equals(IShape2D other)
{ {
return (other is Polygon otherPolygon && Equals(otherPolygon)); return other is Polygon otherPolygon && Equals(otherPolygon);
} }
public bool Equals(Polygon other) public bool Equals(Polygon other)

View File

@ -5,7 +5,7 @@ namespace MoonTools.Bonk
{ {
public struct SweepResult<T> where T : IEquatable<T> public struct SweepResult<T> where T : IEquatable<T>
{ {
public static SweepResult<T> False = new SweepResult<T>(); public readonly static SweepResult<T> False = new SweepResult<T>();
public bool Hit { get; } public bool Hit { get; }
public Vector2 Motion { get; } public Vector2 Motion { get; }

View File

@ -1,7 +1,7 @@
# MoonTools.Bonk # MoonTools.Bonk
[![NuGet Badge](https://buildstats.info/nuget/MoonTools.Bonk)](https://www.nuget.org/packages/MoonTools.Bonk/) [![NuGet Badge](https://buildstats.info/nuget/MoonTools.Bonk)](https://www.nuget.org/packages/MoonTools.Bonk/)
[![Build Status](https://drone.moonside.games/api/badges/MoonsideGames/MoonTools.Bonk/status.svg)](https://drone.moonside.games/MoonsideGames/MoonTools.Bonk) [![Build Status](https://gitea.drone.moonside.games/api/badges/MoonsideGames/MoonTools.Bonk/status.svg)](https://gitea.drone.moonside.games/MoonsideGames/MoonTools.Bonk)
Bonk is a fast and modular collision detection system for .NET that is part of the MoonTools suite. It can be used with any .NET-based game engine. Bonk is a fast and modular collision detection system for .NET that is part of the MoonTools suite. It can be used with any .NET-based game engine.

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -12,4 +12,4 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Bonk\Bonk.csproj" /> <ProjectReference Include="..\Bonk\Bonk.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>