bonk-docs/content/api/IHasAABB2D.md

27 lines
642 B
Markdown
Raw Normal View History

2020-07-18 20:13:59 +00:00
---
title: "IHasAABB2D"
date: 2020-07-18T12:30:21-07:00
weight: 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:
```cs
public AABB TransformedAABB(Transform2D Transform2D)
{
return AABB.Transformed(AABB, transform2D);
}
```