Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
cosmonaut | c7fa0932d6 | |
cosmonaut | e57bae4c44 | |
cosmonaut | 094cf4b3d2 | |
Evan Hemsley | e6bab0de5e |
|
@ -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>
|
||||||
|
|
|
@ -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,13 +14,14 @@
|
||||||
<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" />
|
||||||
|
|
|
@ -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; }
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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; }
|
||||||
|
|
|
@ -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.
|
||||||
|
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue