feat: added sphere primitive
This commit is contained in:
@@ -42,6 +42,8 @@ public readonly struct AABB3D(Vector3D lowerBoundary, Vector3D upperBoundary) :
|
||||
public static bool operator ==(AABB3D left, AABB3D right) => left.UpperBoundary == right.UpperBoundary && left.LowerBoundary == right.LowerBoundary;
|
||||
public static bool operator !=(AABB3D left, AABB3D right) => left.UpperBoundary != right.UpperBoundary || left.LowerBoundary != right.LowerBoundary;
|
||||
|
||||
public static implicit operator AABB3D(Sphere3D sphere) => new(sphere.Center - new Vector3D(sphere.Radius, sphere.Radius, sphere.Radius), sphere.Center + new Vector3D(sphere.Radius, sphere.Radius, sphere.Radius));
|
||||
|
||||
/// <summary>
|
||||
/// Creates an <see cref="AABB3D"/> from a collection of <see cref="Vector3D"/>s.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user