载入中...
搜索中...
未找到
eve::spatial::AABB2结构体 参考

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
 

详细描述

Axis-aligned 2D bounding box (min/max inclusive).

在文件 Bounds.h 第 10 行定义.

成员函数说明

◆ centerX()

float eve::spatial::AABB2::centerX ( ) const
inline

Center X of the box.

在文件 Bounds.h 第 21 行定义.

引用了 maxX , 以及 minX.

◆ centerY()

float eve::spatial::AABB2::centerY ( ) const
inline

Center Y of the box.

在文件 Bounds.h 第 23 行定义.

引用了 maxY , 以及 minY.

◆ containsAABB()

bool eve::spatial::AABB2::containsAABB ( const AABB2 &  o) const
inline

True if the other box is fully inside this one.

在文件 Bounds.h 第 34 行定义.

引用了 maxX, maxY, minX , 以及 minY.

◆ containsPoint()

bool eve::spatial::AABB2::containsPoint ( float  x,
float  y 
) const
inline

True if the point lies inside or on the boundary.

在文件 Bounds.h 第 29 行定义.

引用了 maxY, minX, minY, x , 以及 y.

◆ height()

float eve::spatial::AABB2::height ( ) const
inline

Extent along Y (max - min).

在文件 Bounds.h 第 19 行定义.

引用了 maxY , 以及 minY.

被这些函数引用 eve::spatial::BSPTree2D::BSPTree2D() , 以及 eve::spatial::QuadTree::QuadTree().

◆ intersectsAABB()

bool eve::spatial::AABB2::intersectsAABB ( const AABB2 &  o) const
inline

True if the boxes overlap (inclusive edges).

在文件 Bounds.h 第 39 行定义.

引用了 maxX, maxY, minX , 以及 minY.

◆ intersectsCircle()

bool eve::spatial::AABB2::intersectsCircle ( float  cx,
float  cy,
float  radius 
) const
inline

True if the circle overlaps this 2D box.

在文件 Bounds.h 第 44 行定义.

引用了 cx, cy, dx, dy, maxX, maxY, minX, minY , 以及 radius.

◆ valid()

bool eve::spatial::AABB2::valid ( ) const
inline

True when min <= max on every axis.

在文件 Bounds.h 第 26 行定义.

引用了 maxX, maxY, minX , 以及 minY.

被这些函数引用 eve::spatial::BSPTree2D::BSPTree2D() , 以及 eve::spatial::QuadTree::QuadTree().

◆ width()

float eve::spatial::AABB2::width ( ) const
inline

Extent along X (max - min).

在文件 Bounds.h 第 17 行定义.

引用了 maxX , 以及 minX.

被这些函数引用 eve::spatial::BSPTree2D::BSPTree2D() , 以及 eve::spatial::QuadTree::QuadTree().

类成员变量说明

◆ maxX

float eve::spatial::AABB2::maxX = 0.f

在文件 Bounds.h 第 13 行定义.

被这些函数引用 centerX(), containsAABB(), intersectsAABB(), intersectsCircle(), valid() , 以及 width().

◆ maxY

float eve::spatial::AABB2::maxY = 0.f

在文件 Bounds.h 第 14 行定义.

被这些函数引用 centerY(), containsAABB(), containsPoint(), height(), intersectsAABB(), intersectsCircle() , 以及 valid().

◆ minX

float eve::spatial::AABB2::minX = 0.f

在文件 Bounds.h 第 11 行定义.

被这些函数引用 centerX(), containsAABB(), containsPoint(), intersectsAABB(), intersectsCircle(), valid() , 以及 width().

◆ minY

float eve::spatial::AABB2::minY = 0.f

在文件 Bounds.h 第 12 行定义.

被这些函数引用 centerY(), containsAABB(), containsPoint(), height(), intersectsAABB(), intersectsCircle() , 以及 valid().


该结构体的文档由以下文件生成: