docs: update math API docs

This commit is contained in:
2026-03-20 02:35:15 +08:00
parent e165dbea1c
commit c5b17239ca
243 changed files with 5307 additions and 1327 deletions

View File

@@ -0,0 +1,34 @@
# OBB::Intersects (OBB)
```cpp
bool Intersects(const OBB& other) const;
```
检测该 OBB 与另一个 OBB 是否相交。采用分离轴定理SAT进行检测通过测试 15 条可能的分离轴来判断两个盒子是否重叠。
**参数:**
- `other` - 另一个 OBB 包围盒
**返回:** 两 OBB 相交返回 `true`,否则返回 `false`
**异常:**
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
#include "AABB.h"
#include "Vector3.h"
#include "Matrix4.h"
using namespace XCEngine::Math;
OBB obb1(Vector3(0.0f, 0.0f, 0.0f), Vector3(1.0f, 0.5f, 1.0f));
OBB obb2(Vector3(1.5f, 0.0f, 0.0f), Vector3(1.0f, 0.5f, 1.0f));
if (obb1.Intersects(obb2)) {
}
```