DBox2

public DVector2 Min

Language: C#

The minimum corner of the box.

public DVector2 Max

Language: C#

The maximum corner of the box.

public DVector2 Center

Language: C#

The center point of the box.

public DVector2 Size

Language: C#

The size of the box along each dimension.

public DVector2 HalfSize

Language: C#

Half the size of the box along each dimension.

public DBox2(DVector2 min, DVector2 max)

Language: C#

Constructs a box from minimum and maximum corner vectors.

public DBox2(double min0, double min1, double max0, double max1)

Language: C#

Constructs a box from individual minimum and maximum components.

public DBox2(DBox2 original)

Language: C#

Copy constructor.

public static DBox2 Union(DBox2 a, DBox2 b)

Language: C#

Creates the union of two boxes.

public static DBox2 Union(DBox2 a, DVector2 b)

Language: C#

Creates the union of box and vector.

public static DBox2 Intersection(DBox2 a, DBox2 b)

Language: C#

Creates the intersection of two boxes.

public static bool SphereIntersection(DBox2 box, DVector2 origin, double radius)

Language: C#

Checks if a sphere intersects with the box.

public static double Distance(DBox2 box, DVector2 point)

Language: C#

Calculates the distance from a point to the box.

public static double Distance(DBox2 a, DBox2 b)

Language: C#

Calculates the distance between two boxes.

public bool ContainsInclusive(DVector2 point)

Language: C#

Checks if a point is inside the box (inclusive).

public bool ContainsExclusive(DVector2 point)

Language: C#

Checks if a point is inside the box (exclusive).

public bool ContainsInclusive(DBox2 point)

Language: C#

Checks if another box is entirely inside this box (inclusive).

public bool ContainsExclusive(DBox2 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(DBox2 aabb)

Language: C#

Checks if this box collides with another box.