diff options
author | quou <quou@disroot.org> | 2025-01-14 00:04:55 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2025-01-14 00:04:55 +1100 |
commit | fd488f9603f22db0312eadcdb93b7880922dc9a7 (patch) | |
tree | 15b7986e2c06eea57575f4c97811cbc65eaa120a /model.cpp | |
parent | dfa0b6de5a070d1be63d04574c3b8ce469518250 (diff) |
misc refactoring
Diffstat (limited to 'model.cpp')
-rw-r--r-- | model.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
@@ -1,3 +1,4 @@ +#include "camera.hpp" #include "maths.hpp" #include "model.hpp" @@ -257,24 +258,6 @@ void Material_Loader::unload(Asset* a) { (void)a; } -void Camera::init(float vfov, const v3f& f, const v3f& p) { - fov = vfov; - forward = f; - position = p; - near = 0.1f; - far = 1000.0f; - asp = 1.0f; -} - -m4f Camera::get_view() const { - v3f up(0.0f, 1.0f, 0.0f); - return m4f::lookat(position, position + forward, up); -} - -m4f Camera::get_proj() const { - return m4f::pers(fov, asp, near, far); -} - void Model_Instance::init(Device* dev, Heap* h, Model* model) { m = model; mvp = dev->create_buffer( |