Files
XCEngine/docs/api/math/obb/get-max.md
2026-03-20 02:35:15 +08:00

485 B

OBB::GetMax

Vector3 GetMax() const;

获取 OBB 包围盒在局部坐标系下的最大顶点。该点是中心点加上半长向量计算得出。

参数:

返回: 包围盒的最大顶点

异常:

线程安全:

复杂度: O(1)

示例:

#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();