From 3649c8247c319869553506c432f9ba1a71ef2e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Tue, 8 Jun 2021 00:47:39 +0200 Subject: [PATCH] cleanup before PR --- lib/Ray/sources/Camera/Camera3D.cpp | 1 - sources/Runner/Runner.cpp | 4 ++-- sources/System/Renderer/RenderSystem.cpp | 20 -------------------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/lib/Ray/sources/Camera/Camera3D.cpp b/lib/Ray/sources/Camera/Camera3D.cpp index 0c4b3d13..aa2b2a9b 100644 --- a/lib/Ray/sources/Camera/Camera3D.cpp +++ b/lib/Ray/sources/Camera/Camera3D.cpp @@ -10,7 +10,6 @@ RAY::Camera::Camera3D::Camera3D(const RAY::Vector3 &position, const RAY::Vector3 &target, const RAY::Vector3 &up, float fovy, Projection projection): _camera({position, target, up, fovy, projection}) { - SetCameraMode(_camera, CAMERA_FREE); } void RAY::Camera::Camera3D::setPosition(const Vector3 &Position) diff --git a/sources/Runner/Runner.cpp b/sources/Runner/Runner.cpp index 39fe9fd1..6371c648 100644 --- a/sources/Runner/Runner.cpp +++ b/sources/Runner/Runner.cpp @@ -77,8 +77,8 @@ namespace BBM animation.setAnimIndex(5); }); scene->addEntity("camera") - .addComponent(10, 20, 10) - .addComponent(Vector3f(2, 0, 2)); + .addComponent(8, 20, 7) + .addComponent(Vector3f(8, 0, 8)); /*scene->addEntity("cube") .addComponent(-5, 0, -5) .addComponent(Vector3f(0, 0, 0), Vector3f(3, 3, 3), RED) diff --git a/sources/System/Renderer/RenderSystem.cpp b/sources/System/Renderer/RenderSystem.cpp index b6ef7891..7c5cfd9a 100644 --- a/sources/System/Renderer/RenderSystem.cpp +++ b/sources/System/Renderer/RenderSystem.cpp @@ -32,26 +32,6 @@ namespace BBM this->_window.useCamera(this->_camera); for (auto &[_, pos, drawable] : this->_wal.scene->view()) { - if (_.getName() == "cube") { - auto col = _.getComponent(); - DrawCubeWires({pos.position.x, pos.position.y, pos.position.z}, - col.bound.x, - col.bound.y, - col.bound.z, - WHITE); - DrawPoint3D({pos.position.x, pos.position.y, pos.position.z}, BLUE); - DrawPoint3D({pos.position.x + col.bound.x, pos.position.y + col.bound.y, pos.position.z + col.bound.z}, BLUE); - } - if (_.getName() == "player") { - auto col = _.getComponent(); - DrawCubeWires({pos.position.x, pos.position.y, pos.position.z}, - col.bound.x, - col.bound.y, - col.bound.z, - WHITE); - DrawPoint3D({pos.position.x, pos.position.y, pos.position.z}, BLUE); - DrawPoint3D({pos.position.x + col.bound.x, pos.position.y + col.bound.y, pos.position.z + col.bound.z}, BLUE); - } drawable.drawable->setPosition(pos.position); drawable.drawable->drawOn(this->_window); }