From 71b459c0246d70d0bba5dd49662b5534c579251e Mon Sep 17 00:00:00 2001 From: hyzboy Date: Wed, 18 Jun 2025 01:56:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E9=80=8F=E8=A7=86=E7=9F=A9?= =?UTF-8?q?=E9=98=B5=E8=AE=A1=E7=AE=97X=E8=BD=B4=E6=96=B9=E5=90=91?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/hgl/math/Matrix.h | 2 +- src/Math/Matrix4f.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/hgl/math/Matrix.h b/inc/hgl/math/Matrix.h index 5c84df0..4bebb65 100644 --- a/inc/hgl/math/Matrix.h +++ b/inc/hgl/math/Matrix.h @@ -110,7 +110,7 @@ namespace hgl * @param target 目标位置 * @param up 向上向量 */ - Matrix4f lookat(const Vector3f &eye,const Vector3f &target,const Vector3f &up); + Matrix4f lookat(const Vector3f &eye,const Vector3f &target,const Vector3f &up=AxisVector::Z); inline Matrix4f translate(const Vector3f &v) { diff --git a/src/Math/Matrix4f.cpp b/src/Math/Matrix4f.cpp index 0fce0a6..92e91bf 100644 --- a/src/Math/Matrix4f.cpp +++ b/src/Math/Matrix4f.cpp @@ -81,7 +81,7 @@ namespace hgl float f = 1.0f / tanf( deg2rad( 0.5f * field_of_view ) ); return Matrix4f( - f / aspect_ratio, + -f / aspect_ratio, 0.0f, 0.0f, 0.0f,