mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-26 08:57:06 +00:00
Move Common functionality to Core project & rendering and Model support as well
This commit is contained in:
16
PckStudio.Core/Extensions/BoundingBoxExtensions.cs
Normal file
16
PckStudio.Core/Extensions/BoundingBoxExtensions.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PckStudio.Core.Extensions
|
||||
{
|
||||
public static class BoundingBoxExtensions
|
||||
{
|
||||
public static BoundingBox GetEnclosingBoundingBox(this IEnumerable<BoundingBox> boundingBoxes)
|
||||
{
|
||||
return boundingBoxes.DefaultIfEmpty().Aggregate((a, b) => new BoundingBox(OpenTK.Vector3.ComponentMin(a.Start, b.Start), OpenTK.Vector3.ComponentMax(a.End, b.End)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user