From bf240d7eeaa89657462b705849fde56e54e237db Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Tue, 6 Feb 2024 17:37:20 -0300 Subject: refa Use quaternion for orientation --- src/view_3d.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/view_3d.cpp') diff --git a/src/view_3d.cpp b/src/view_3d.cpp index 8f4f14c..7db0015 100644 --- a/src/view_3d.cpp +++ b/src/view_3d.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2022 Frederico de Oliveira Linhares + * Copyright 2022-2024 Frederico de Oliveira Linhares * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ #include "view_3d.hpp" #include "sprite.hpp" -#include "rotation_3d.hpp" +#include "orientation_3d.hpp" #include "vector_3d.hpp" #include "vector_4d.hpp" #include "vk/sprite.hpp" @@ -69,13 +69,13 @@ cg_cView3D_set_camera_position(mrb_state *mrb, mrb_value self) } static mrb_value -cg_cView3D_set_camera_rotation(mrb_state *mrb, mrb_value self) +cg_cView3D_set_camera_orientation(mrb_state *mrb, mrb_value self) { - std::shared_ptr *camera_rotation; + std::shared_ptr *camera_orientation; auto ptr = (std::shared_ptr*)DATA_PTR(self); - mrb_get_args(mrb, "d", &camera_rotation, &cg_rotation_3d_type); - (*ptr)->camera_rotation = (*camera_rotation); + mrb_get_args(mrb, "d", &camera_orientation, &cg_orientation_3d_type); + (*ptr)->camera_orientation = (*camera_orientation); return self; } @@ -116,7 +116,7 @@ cg_view_3d_init(mrb_state *mrb) mrb, cg_cView3D, "camera_position=", cg_cView3D_set_camera_position, MRB_ARGS_REQ(1)); mrb_define_method( - mrb, cg_cView3D, "camera_rotation=", cg_cView3D_set_camera_rotation, + mrb, cg_cView3D, "camera_orientation=", cg_cView3D_set_camera_orientation, MRB_ARGS_REQ(1)); mrb_define_method( mrb, cg_cView3D, "field_of_view", cg_cView3D_get_field_of_view, -- cgit v1.2.3