IBox2
public IVector2 Min
Language: C#
The minimum corner of the box.
public IVector2 Max
Language: C#
The maximum corner of the box.
public IVector2 Center
Language: C#
The center point of the box.
public IVector2 Size
Language: C#
The size of the box along each dimension.
public IVector2 HalfSize
Language: C#
Half the size of the box along each dimension.
public IBox2(IVector2 min, IVector2 max)
Language: C#
Constructs a box from minimum and maximum corner vectors.
public IBox2(int min0, int min1, int max0, int max1)
Language: C#
Constructs a box from individual minimum and maximum components.
public IBox2(IBox2 original)
Language: C#
Copy constructor.
public static IBox2 Union(IBox2 a, IBox2 b)
Language: C#
Creates the union of two boxes.
public static IBox2 Union(IBox2 a, IVector2 b)
Language: C#
Creates the union of box and vector.
public static IBox2 Intersection(IBox2 a, IBox2 b)
Language: C#
Creates the intersection of two boxes.
public static bool SphereIntersection(IBox2 box, IVector2 origin, int radius)
Language: C#
Checks if a sphere intersects with the box.
public static float Distance(IBox2 box, IVector2 point)
Language: C#
Calculates the distance from a point to the box.
public static float Distance(IBox2 a, IBox2 b)
Language: C#
Calculates the distance between two boxes.
public bool ContainsInclusive(IVector2 point)
Language: C#
Checks if a point is inside the box (inclusive).
public bool ContainsExclusive(IVector2 point)
Language: C#
Checks if a point is inside the box (exclusive).
public bool ContainsInclusive(IBox2 point)
Language: C#
Checks if another box is entirely inside this box (inclusive).
public bool ContainsExclusive(IBox2 point)
Language: C#
Checks if another box is entirely inside this box (exclusive).
public override string ToString()
Language: C#
Returns a string representation of the box.
public bool Collides(IBox2 aabb)
Language: C#
Checks if this box collides with another box.