import { Segment } from './Segment'; import { Vec2D } from './Vec2D'; declare class AABB { center: Vec2D; dim: Vec2D; /** * An axis-aligned bounding box. * * @param x X-coordinate of the center * @param y Y-coordinate of the center * @param w Width of the bounding box * @param h Height of the bounding box * @return New AABB object */ constructor(x: number, y: number, w: number, h: number); /** * Create a copy of the current AABB. * * @return New AABB object */ copy(): AABB; /** * Get the upper-left corner of the AABB. * * @return Coordinates of the upperleft corner */ min(): Vec2D; /** * Get the bottom-right corner of the AABB. * * @return Coordinates of the bottom-right corner */ max(): Vec2D; /** * Get the left side of the AABB. * * @return Line segment of the left face */ left(): Segment; /** * Get the right side of the AABB. * * @return Line segment of the right face */ right(): Segment; /** * Get the top side of the AABB. * * @return Line segment of the top face */ top(): Segment; /** * Get the bottom side of the AABB. * * @return Line segment of the bottom face */ bottom(): Segment; /** * Test if a point is within the AABB. * * @param point Test point * @return Is the point in bounds? */ isInBounds(point: Vec2D): boolean; /** * Test if the AABB is colliding with another. * * @param other Paired AABB * @return Are bounding boxes colliding? */ isColliding(other: AABB): boolean; } export { AABB };