corners method
continuous-integration/drone/push Build is passing Details

3D
cosmonaut 2020-09-16 12:59:10 -07:00
parent 6bda2e5ab4
commit 2f341aaeae
1 changed files with 12 additions and 0 deletions

View File

@ -49,6 +49,18 @@ namespace MoonTools.Bonk
);
}
public IEnumerable<Vector3> 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);