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

@@ -1,25 +1,36 @@
# Matrix4::Orthographic
# Matrix4x4::Orthographic
```cpp
static Matrix4 Orthographic(float left, float right, float bottom, float top, float near, float far)
static Matrix4x4 Orthographic(float left, float right, float bottom, float top, float near, float far)
```
创建正交投影矩阵。
创建正交投影矩阵。用于 2D UI 或建筑制图等需要保持物体实际大小的场景。
**参数:**
- `left` - 左裁剪面
- `right` - 右裁剪面
- `bottom` - 下裁剪面
- `top` - 上裁剪面
- `near` - 近裁剪面距离
- `far` - 远裁剪面距离
- `left` - 左裁切面 x 坐标
- `right` - 右裁切面 x 坐标
- `bottom` - 下裁切面 y 坐标
- `top` - 上裁切面 y 坐标
- `near` - 近裁切面 z 坐标
- `far` - 远裁切面 z 坐标
**返回:** `Matrix4` - 正交投影矩阵
**返回:** 正交投影矩阵
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
Matrix4 ortho = Matrix4::Orthographic(-aspect, aspect, -1.0f, 1.0f, 0.1f, 100.0f);
#include "XCEngine/Math/Matrix4.h"
using namespace XCEngine::Math;
Matrix4 ortho = Matrix4::Orthographic(-10.0f, 10.0f, -5.0f, 5.0f, 0.1f, 100.0f);
```
## 相关文档
- [Matrix4](matrix4.md) - 返回类总览
- [Perspective](perspective.md) - 透视投影