Skip to content
IsaacShelton edited this page Nov 13, 2022 · 6 revisions

AABB

AABB represents the type of an axis-aligned boundary box.

Specifications

Type Size Memory Management Model File
AABB ? bytes Scoped 2.7/AABB.adept

Definition

struct <$T> AABB (x, y, w, h $T)

where

$T is any numeric type

Fields

Name Type Description
x $T X Coordinate
y $T Y Coordinate
w $T Width
h $T Height

Memory Management

Children are freed when they run out of scope.

Functions

  • func AABB(x, y, w, h $T) <$T> AABB

    Constructs an AABB.

    [view src]

Methods

  • func intersecting(this *<$T> AABB, other POD <$T> AABB) bool

    Returns whether two AABBs are intersecting. Touching isn't considered intersecting.

    [view src]

  • func intersectingPoint(this *<$T> AABB, point_x, point_y POD $T) bool

    Returns whether an AABB intersects a point. Touching is considered intersecting.

    [view src]

Clone this wiki locally