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.
827 B
827 B
Matrix4x4::Orthographic
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)
示例:
#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 - 返回类总览
- Perspective - 透视投影