Files
XCSDD/docs/api/math/bounds/bounds.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
2026-03-19 12:44:08 +08:00

1.2 KiB

Bounds

轴对齐包围盒 (AABB),中心-范围表示。

头文件: #include <XCEngine/Math/Bounds.h>

命名空间: XCEngine::Math

结构体定义

struct Bounds {
    Vector3 center = Vector3::Zero();
    Vector3 extents = Vector3::Zero();
};

构造函数

  • Bounds() - 默认构造
  • Bounds(const Vector3& center, const Vector3& size) - 从中心和大小构造

实例方法

方法 返回值 描述
GetMin() Vector3 最小点
GetMax() 最大点
SetMinMax(min, max) void 从最小/最大点设置
Contains(point) bool 点是否在盒内
Intersects(other) bool 与另一个 Bounds 相交
Encapsulate(point) void 扩展包含点
Encapsulate(bounds) void 扩展包含另一个 Bounds
Expand(amount) void 扩展包围盒
GetClosestPoint(point) Vector3 盒上最接近的点
GetVolume() float 体积

相关文档