bonk-docs/content/api/IHasAABB2D.md

642 B

title date weight
IHasAABB2D 2020-07-18T12:30:21-07:00 6

IHasAABB2D is an interface that allows for spatial hashing to be performed.

Properties

public AABB { get; }

An axis-aligned bounding box for the shape. This is stored so we can efficiently transform the AABB when necessary.

AABB TransformedAABB(Transform2D transform)

A method which returns the axis-aligned bounding box for the transformed shape.

For example, the TransformedAABB method for Bonk's Circle implementation:

public AABB TransformedAABB(Transform2D Transform2D)
{
    return AABB.Transformed(AABB, transform2D);
}