Represents an axis-aligned bounding box (AABB) defined by its minimum and maximum coordinates along the X and Y axes. This is the collision area of a Gondwana.Drawing.Tile.".
More...
|
| | Aabb (float minX, float minY, float maxX, float maxY) |
| | Initializes a new instance of the Aabb struct with the specified boundaries.
|
| bool | Intersects (in Aabb other) |
| | Determines whether this bounding box intersects with another bounding box.
|
| Rectangle | ToRectangle () |
| | Converts this bounding box to a Rectangle by casting the floating-point coordinates to integers.
|
|
| float | MinX [get] |
| | Gets the minimum X coordinate of the bounding box.
|
| float | MinY [get] |
| | Gets the minimum Y coordinate of the bounding box.
|
| float | MaxX [get] |
| | Gets the maximum X coordinate of the bounding box.
|
| float | MaxY [get] |
| | Gets the maximum Y coordinate of the bounding box.
|
| float | Width [get] |
| | Gets the width of the bounding box.
|
| float | Height [get] |
| | Gets the height of the bounding box.
|
| PointF | Center [get] |
| | Gets the center point of the bounding box.
|
Represents an axis-aligned bounding box (AABB) defined by its minimum and maximum coordinates along the X and Y axes. This is the collision area of a Gondwana.Drawing.Tile.".
◆ Aabb()
| Gondwana.Collisions.Aabb.Aabb |
( |
float | minX, |
|
|
float | minY, |
|
|
float | maxX, |
|
|
float | maxY ) |
Initializes a new instance of the Aabb struct with the specified boundaries.
- Parameters
-
| minX | The minimum X coordinate. |
| minY | The minimum Y coordinate. |
| maxX | The maximum X coordinate. |
| maxY | The maximum Y coordinate. |
- Exceptions
-
| ArgumentException | Thrown when maxX is less than minX , or maxY is less than minY . |
◆ FromRectangle()
| Aabb Gondwana.Collisions.Aabb.FromRectangle |
( |
Rectangle | r | ) |
|
|
static |
Creates an Aabb from a Rectangle.
- Parameters
-
| r | The rectangle to convert. |
- Returns
- An Aabb with boundaries matching the rectangle.
◆ FromRectangleF()
| Aabb Gondwana.Collisions.Aabb.FromRectangleF |
( |
RectangleF | r | ) |
|
|
static |
Creates an Aabb from a RectangleF.
- Parameters
-
| r | The rectangle to convert. |
- Returns
- An Aabb with boundaries matching the rectangle.
◆ Intersects()
| bool Gondwana.Collisions.Aabb.Intersects |
( |
in Aabb | other | ) |
|
Determines whether this bounding box intersects with another bounding box.
- Parameters
-
| other | The other bounding box to test for intersection. |
- Returns
true if the bounding boxes intersect; otherwise, false.
◆ ToRectangle()
| Rectangle Gondwana.Collisions.Aabb.ToRectangle |
( |
| ) |
|
Converts this bounding box to a Rectangle by casting the floating-point coordinates to integers.
- Returns
- A Rectangle representing this bounding box.
◆ Center
| PointF Gondwana.Collisions.Aabb.Center |
|
get |
Gets the center point of the bounding box.
◆ Height
| float Gondwana.Collisions.Aabb.Height |
|
get |
Gets the height of the bounding box.
◆ MaxX
| float Gondwana.Collisions.Aabb.MaxX |
|
get |
Gets the maximum X coordinate of the bounding box.
◆ MaxY
| float Gondwana.Collisions.Aabb.MaxY |
|
get |
Gets the maximum Y coordinate of the bounding box.
◆ MinX
| float Gondwana.Collisions.Aabb.MinX |
|
get |
Gets the minimum X coordinate of the bounding box.
◆ MinY
| float Gondwana.Collisions.Aabb.MinY |
|
get |
Gets the minimum Y coordinate of the bounding box.
◆ Width
| float Gondwana.Collisions.Aabb.Width |
|
get |
Gets the width of the bounding box.