From b536154f912b1f35a548acebc2f6d7fff171e806 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 28 Nov 2023 20:41:25 +0100 Subject: chore(engine): rename the Camera method up to global_up --- engine/src/camera.rs | 2 +- engine/src/renderer/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'engine') diff --git a/engine/src/camera.rs b/engine/src/camera.rs index 1bae5bb..7abb9af 100644 --- a/engine/src/camera.rs +++ b/engine/src/camera.rs @@ -12,7 +12,7 @@ pub trait Camera /// /// The default implementation which returns [`Vec3::UP`] should be fine in most /// cases. - fn up(&self) -> Vec3 + fn global_up(&self) -> Vec3 { Vec3::UP } diff --git a/engine/src/renderer/mod.rs b/engine/src/renderer/mod.rs index 2c513ff..9996551 100644 --- a/engine/src/renderer/mod.rs +++ b/engine/src/renderer/mod.rs @@ -350,7 +350,7 @@ fn create_view(camera: &impl Camera) -> Matrix { let mut view = Matrix::new(); - view.look_at(&camera.position(), &camera.target(), &camera.up()); + view.look_at(&camera.position(), &camera.target(), &camera.global_up()); view } -- cgit v1.2.3-18-g5258