summaryrefslogtreecommitdiff
path: root/model.cpp
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2025-01-14 00:04:55 +1100
committerquou <quou@disroot.org>2025-01-14 00:04:55 +1100
commitfd488f9603f22db0312eadcdb93b7880922dc9a7 (patch)
tree15b7986e2c06eea57575f4c97811cbc65eaa120a /model.cpp
parentdfa0b6de5a070d1be63d04574c3b8ce469518250 (diff)
misc refactoring
Diffstat (limited to 'model.cpp')
-rw-r--r--model.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/model.cpp b/model.cpp
index 79c55de..ccef4c6 100644
--- a/model.cpp
+++ b/model.cpp
@@ -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(