cleanup before PR

This commit is contained in:
Clément Le Bihan
2021-06-08 00:47:39 +02:00
parent 556021a4ef
commit 3649c8247c
3 changed files with 2 additions and 23 deletions
-1
View File
@@ -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)
+2 -2
View File
@@ -77,8 +77,8 @@ namespace BBM
animation.setAnimIndex(5);
});
scene->addEntity("camera")
.addComponent<PositionComponent>(10, 20, 10)
.addComponent<CameraComponent>(Vector3f(2, 0, 2));
.addComponent<PositionComponent>(8, 20, 7)
.addComponent<CameraComponent>(Vector3f(8, 0, 8));
/*scene->addEntity("cube")
.addComponent<PositionComponent>(-5, 0, -5)
.addComponent<Drawable3DComponent, RAY3D::Cube>(Vector3f(0, 0, 0), Vector3f(3, 3, 3), RED)
-20
View File
@@ -32,26 +32,6 @@ namespace BBM
this->_window.useCamera(this->_camera);
for (auto &[_, pos, drawable] : this->_wal.scene->view<PositionComponent, Drawable3DComponent>()) {
if (_.getName() == "cube") {
auto col = _.getComponent<CollisionComponent>();
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<CollisionComponent>();
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);
}