Files
XCEngine/docs/api/math/matrix4/perspective.md
ssdfasd b414bc5326 refactor(docs): Fix broken links across multiple modules
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.
2026-03-26 02:41:00 +08:00

37 lines
835 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Matrix4x4::Perspective
```cpp
static Matrix4x4 Perspective(float fov, float aspect, float near, float far)
```
创建透视投影矩阵。用于将 3D 场景投影到 2D 视口,产生近大远小的效果。
**参数:**
- `fov` - 垂直视野角度(弧度)
- `aspect` - 宽高比width / height
- `near` - 近裁切面距离
- `far` - 远裁切面距离
**返回:** 透视投影矩阵
**线程安全:**
**复杂度:** O(1)
**示例:**
```cpp
#include "XCEngine/Core/Math/Matrix4.h"
using namespace XCEngine::Math;
float fov = 60.0f * 3.14159265f / 180.0f;
float aspect = 16.0f / 9.0f;
Matrix4 proj = Matrix4::Perspective(fov, aspect, 0.1f, 100.0f);
```
## 相关文档
- [Matrix4](matrix4.md) - 返回类总览
- [Orthographic](orthographic.md) - 正交投影
- [LookAt](lookat.md) - 视图矩阵