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

@@ -4,19 +4,29 @@
Vector3 GetPoint(float t) const
```
获取射线上指定距离处的点。
获取射线上指定参数距离处的点。计算公式:`origin + direction * t`
**参数:**
- `t` - 沿射线方向的参数距离
**返回:** `Vector3` - 射线上的点 `origin + direction * t`
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
Ray ray(cameraPosition, mouseRayDir.Normalized());
float t = 100.0f;
Vector3 point = ray.GetPoint(t); // 沿射线方向 100 单位处的点
#include <XCEngine/Math/Ray.h>
#include <XCEngine/Math/Vector3.h>
using namespace XCEngine::Math;
Ray ray(Vector3(0.0f, 0.0f, 0.0f), Vector3(1.0f, 0.0f, 0.0f));
Vector3 point = ray.GetPoint(100.0f); // point = (100, 0, 0)
```
## 相关文档
- [Ray 类总览](ray.md) - 返回类总览