An Axis-Aligned Bounding Box.
More...
Inherits IEquatable< AABB >.
|
| AABB (Vec2 lowerBound, Vec2 upperBound) |
| Constructs an AABB with the given lower and upper bounds.
|
|
override string | ToString () |
| Returns a string representation of the AABB.
|
|
bool | Equals (AABB other) |
| Checks if this AABB is equal to another AABB.
|
|
override bool | Equals (object? obj) |
| Checks if this AABB is equal to another object.
|
|
override int | GetHashCode () |
| Returns a hash code for this AABB.
|
|
|
static AABB | MakeAABB (ReadOnlySpan< Vec2 > points, float radius) |
| Compute the bounding box of an array of circles.
|
|
|
Vec2 | LowerBound |
| The lower bound of the AABB.
|
|
Vec2 | UpperBound |
| The upper bound of the AABB.
|
|
|
float | Width [get] |
| The width of the AABB.
|
|
float | Height [get] |
| The height of the AABB.
|
|
An Axis-Aligned Bounding Box.
"Axis-Aligned" here means that the box is aligned with the coordinate axes: the sides of the box are parallel to the x and y axes.
The bounding box is defined by two points, the lower bound and upper bound. AABBs are used for broad-phase collision detection. They can also be used to find the shapes that intersect or are within an axis-aligned rectangle.
◆ AABB()
Box2D.AABB.AABB |
( |
Vec2 |
lowerBound, |
|
|
Vec2 |
upperBound |
|
) |
| |
|
inline |
Constructs an AABB with the given lower and upper bounds.
- Parameters
-
lowerBound | The lower bound of the AABB |
upperBound | The upper bound of the AABB |
◆ Equals() [1/2]
bool Box2D.AABB.Equals |
( |
AABB |
other | ) |
|
Checks if this AABB is equal to another AABB.
- Parameters
-
other | The other AABB to compare to |
- Returns
- True if the AABBs are equal, false otherwise
◆ Equals() [2/2]
override bool Box2D.AABB.Equals |
( |
object? |
obj | ) |
|
Checks if this AABB is equal to another object.
- Parameters
-
obj | The object to compare to |
- Returns
- True if the object is an AABB and is equal to this AABB, false otherwise
◆ GetHashCode()
override int Box2D.AABB.GetHashCode |
( |
| ) |
|
Returns a hash code for this AABB.
- Returns
- A hash code for this AABB
◆ ToString()
override string Box2D.AABB.ToString |
( |
| ) |
|
|
inline |
Returns a string representation of the AABB.
- Returns
- A string representation of the AABB
◆ Height
The height of the AABB.
This is not an editable property. You must modify the lower and upper bounds to change the height.
◆ Width
The width of the AABB.
This is not an editable property. You must modify the lower and upper bounds to change the width.
The documentation for this struct was generated from the following file:
- src/Box2DBindings/AABB.cs