26 lines
517 B
Markdown
26 lines
517 B
Markdown
|
|
# Matrix4::Orthographic
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
static Matrix4 Orthographic(float left, float right, float bottom, float top, float near, float far)
|
||
|
|
```
|
||
|
|
|
||
|
|
创建正交投影矩阵。
|
||
|
|
|
||
|
|
**参数:**
|
||
|
|
- `left` - 左裁剪面
|
||
|
|
- `right` - 右裁剪面
|
||
|
|
- `bottom` - 下裁剪面
|
||
|
|
- `top` - 上裁剪面
|
||
|
|
- `near` - 近裁剪面距离
|
||
|
|
- `far` - 远裁剪面距离
|
||
|
|
|
||
|
|
**返回:** `Matrix4` - 正交投影矩阵
|
||
|
|
|
||
|
|
**复杂度:** O(1)
|
||
|
|
|
||
|
|
**示例:**
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
Matrix4 ortho = Matrix4::Orthographic(-aspect, aspect, -1.0f, 1.0f, 0.1f, 100.0f);
|
||
|
|
```
|