Fixed broken references: - texture-import-settings: Fix 16 files referencing wrong overview filename - math/rectint: Fix 9 method links (rectint-* → get*, contains, intersects) - rhi/opengl/device: Fix 8 cross-references (opengl-* → */**) - resources/mesh: Fix meshsection and vertexattribute links - rhi/d3d12/sampler: Fix RHISampler reference path - math/vector3: Fix projectonplane → project-on-plane - rhi/opengl/command-list: Remove broken ClearFlag enum ref - rhi/opengl/device: Create 2 new method docs (MakeContextCurrent, GetNativeContext) - rhi/device: Fix device-info types reference All 0 broken references remaining.
36 lines
827 B
Markdown
36 lines
827 B
Markdown
# Matrix4x4::Orthographic
|
|
|
|
```cpp
|
|
static Matrix4x4 Orthographic(float left, float right, float bottom, float top, float near, float far)
|
|
```
|
|
|
|
创建正交投影矩阵。用于 2D UI 或建筑制图等需要保持物体实际大小的场景。
|
|
|
|
**参数:**
|
|
- `left` - 左裁切面 x 坐标
|
|
- `right` - 右裁切面 x 坐标
|
|
- `bottom` - 下裁切面 y 坐标
|
|
- `top` - 上裁切面 y 坐标
|
|
- `near` - 近裁切面 z 坐标
|
|
- `far` - 远裁切面 z 坐标
|
|
|
|
**返回:** 正交投影矩阵
|
|
|
|
**线程安全:** ✅
|
|
|
|
**复杂度:** O(1)
|
|
|
|
**示例:**
|
|
|
|
```cpp
|
|
#include "XCEngine/Core/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) - 透视投影 |