diff --git a/Bonk/AABB3D.cs b/Bonk/AABB3D.cs index 90d0e03..b3e2e93 100644 --- a/Bonk/AABB3D.cs +++ b/Bonk/AABB3D.cs @@ -49,6 +49,18 @@ namespace MoonTools.Bonk ); } + public IEnumerable AABBCorners() + { + yield return Min; + yield return new Vector3(Min.X, Min.Y, Max.Z); + yield return new Vector3(Min.X, Max.Y, Min.Z); + yield return new Vector3(Max.X, Min.Y, Min.Z); + yield return new Vector3(Min.X, Max.Y, Max.Z); + yield return new Vector3(Max.X, Min.Y, Max.Z); + yield return new Vector3(Max.X, Max.Y, Min.Z); + yield return Max; + } + public override bool Equals(object obj) { return obj is AABB3D d && Equals(d);