Gondwana Game Engine
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop, mobile, and web platforms using SkiaSharp for graphics and NAudio for sound.
Loading...
Searching...
No Matches
Gondwana.Collisions.Aabb Struct Reference

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...

Public Member Functions

 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.

Static Public Member Functions

static Aabb FromRectangle (Rectangle r)
 Creates an Aabb from a Rectangle.
static Aabb FromRectangleF (RectangleF r)
 Creates an Aabb from a RectangleF.

Properties

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.

Detailed Description

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.".

Constructor & Destructor Documentation

◆ 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
minXThe minimum X coordinate.
minYThe minimum Y coordinate.
maxXThe maximum X coordinate.
maxYThe maximum Y coordinate.
Exceptions
ArgumentExceptionThrown when maxX is less than minX , or maxY is less than minY .

Member Function Documentation

◆ FromRectangle()

Aabb Gondwana.Collisions.Aabb.FromRectangle ( Rectangle r)
static

Creates an Aabb from a Rectangle.

Parameters
rThe 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
rThe 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
otherThe 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.

Property Documentation

◆ 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.