Files
XCEngine/docs/api/math/obb/get-max.md

31 lines
485 B
Markdown
Raw Normal View History

2026-03-20 02:35:15 +08:00
# OBB::GetMax
```cpp
Vector3 GetMax() const;
```
获取 OBB 包围盒在局部坐标系下的最大顶点。该点是中心点加上半长向量计算得出。
**参数:** 无
**返回:** 包围盒的最大顶点
**异常:** 无
**线程安全:** ✅
**复杂度:** O(1)
**示例:**
```cpp
#include "AABB.h"
#include "Vector3.h"
using namespace XCEngine::Math;
OBB obb(Vector3(0.0f, 0.0f, 0.0f), Vector3(1.0f, 0.5f, 1.0f));
Vector3 maxPoint = obb.GetMax();
```