Axis-aligned 2D bounding box (min/max inclusive). 更多...
#include <Bounds.h>
Public 成员函数 | |
| float | width () const |
| Extent along X (max - min). | |
| float | height () const |
| Extent along Y (max - min). | |
| float | centerX () const |
| Center X of the box. | |
| float | centerY () const |
| Center Y of the box. | |
| bool | valid () const |
| True when min <= max on every axis. | |
| bool | containsPoint (float x, float y) const |
| True if the point lies inside or on the boundary. | |
| bool | containsAABB (const AABB2 &o) const |
| True if the other box is fully inside this one. | |
| bool | intersectsAABB (const AABB2 &o) const |
| True if the boxes overlap (inclusive edges). | |
| bool | intersectsCircle (float cx, float cy, float radius) const |
| True if the circle overlaps this 2D box. | |
Public 属性 | |
| float | minX = 0.f |
| float | minY = 0.f |
| float | maxX = 0.f |
| float | maxY = 0.f |
详细描述
成员函数说明
◆ centerX()
|
inline |
◆ centerY()
|
inline |
◆ containsAABB()
|
inline |
◆ containsPoint()
|
inline |
◆ height()
|
inline |
Extent along Y (max - min).
被这些函数引用 eve::spatial::BSPTree2D::BSPTree2D() , 以及 eve::spatial::QuadTree::QuadTree().
◆ intersectsAABB()
|
inline |
◆ intersectsCircle()
|
inline |
◆ valid()
|
inline |
True when min <= max on every axis.
引用了 maxX, maxY, minX , 以及 minY.
被这些函数引用 eve::spatial::BSPTree2D::BSPTree2D() , 以及 eve::spatial::QuadTree::QuadTree().
◆ width()
|
inline |
Extent along X (max - min).
被这些函数引用 eve::spatial::BSPTree2D::BSPTree2D() , 以及 eve::spatial::QuadTree::QuadTree().
类成员变量说明
◆ maxX
| float eve::spatial::AABB2::maxX = 0.f |
被这些函数引用 centerX(), containsAABB(), intersectsAABB(), intersectsCircle(), valid() , 以及 width().
◆ maxY
| float eve::spatial::AABB2::maxY = 0.f |
被这些函数引用 centerY(), containsAABB(), containsPoint(), height(), intersectsAABB(), intersectsCircle() , 以及 valid().
◆ minX
| float eve::spatial::AABB2::minX = 0.f |
被这些函数引用 centerX(), containsAABB(), containsPoint(), intersectsAABB(), intersectsCircle(), valid() , 以及 width().
◆ minY
| float eve::spatial::AABB2::minY = 0.f |
被这些函数引用 centerY(), containsAABB(), containsPoint(), height(), intersectsAABB(), intersectsCircle() , 以及 valid().
该结构体的文档由以下文件生成:
- src/modules/spatial/Bounds.h