From adfc179d2e9f2c1b7f862947757cdc3917b2c3a6 Mon Sep 17 00:00:00 2001 From: "arthur.jamet" Date: Wed, 19 May 2021 14:44:09 +0200 Subject: [PATCH] fix compilation --- lib/Ray/CMakeLists.txt | 2 +- lib/Ray/include/Canvas.hpp | 6 ++---- lib/Ray/include/Drawables/2D/Triangle.hpp | 2 +- lib/Ray/include/Drawables/Texture.hpp | 2 +- lib/Ray/include/Window.hpp | 5 +++-- lib/Ray/src/Drawables/2D/Triangle.cpp | 3 ++- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/Ray/CMakeLists.txt b/lib/Ray/CMakeLists.txt index 8da7a687..bd922a20 100644 --- a/lib/Ray/CMakeLists.txt +++ b/lib/Ray/CMakeLists.txt @@ -67,11 +67,11 @@ set(SRC src/Drawables/2D/Point.cpp src/Drawables/2D/Rectangle.cpp src/Drawables/2D/Text.cpp + src/Drawables/2D/Triangle.cpp src/Drawables/ADrawable2D.cpp src/Drawables/ADrawable3D.cpp src/Drawables/Image.cpp src/Drawables/Texture.cpp - src/Drawables/Triangle.cpp src/Color.cpp src/Font.cpp src/Model.cpp diff --git a/lib/Ray/include/Canvas.hpp b/lib/Ray/include/Canvas.hpp index e28d5b39..8fba2b93 100644 --- a/lib/Ray/include/Canvas.hpp +++ b/lib/Ray/include/Canvas.hpp @@ -5,10 +5,8 @@ ** Canvas */ -#ifndef Canvas_HPP_ -#define Canvas_HPP_ - -#include "Drawables/IDrawable.hpp" +#ifndef CANVAS_HPP_ +#define CANVAS_HPP_ namespace RAY { namespace Drawables { diff --git a/lib/Ray/include/Drawables/2D/Triangle.hpp b/lib/Ray/include/Drawables/2D/Triangle.hpp index 98dd9a2f..9ab203d5 100644 --- a/lib/Ray/include/Drawables/2D/Triangle.hpp +++ b/lib/Ray/include/Drawables/2D/Triangle.hpp @@ -21,7 +21,7 @@ namespace RAY::Drawables::Drawables2D { //! @param positionB position of B point //! @param positionC position of C point //! @param Color Color of the circle - Triangle(const Vector2 &positionA, Vector2 positionB, Vector2 positionC,int length, const Color &color); + Triangle(const Vector2 &positionA, Vector2 positionB, Vector2 positionC, const Color &color); //! @brief A default copy constructor diff --git a/lib/Ray/include/Drawables/Texture.hpp b/lib/Ray/include/Drawables/Texture.hpp index ed9de3a9..73d940cc 100644 --- a/lib/Ray/include/Drawables/Texture.hpp +++ b/lib/Ray/include/Drawables/Texture.hpp @@ -15,7 +15,7 @@ namespace RAY { - class Texture: public Canvas, IRessource { + class Texture: public IRessource { public: //! @brief Create an texture, loading a file //! @param filename: path to file to load diff --git a/lib/Ray/include/Window.hpp b/lib/Ray/include/Window.hpp index b4e665f3..15d53733 100644 --- a/lib/Ray/include/Window.hpp +++ b/lib/Ray/include/Window.hpp @@ -12,11 +12,12 @@ #include #include "Vector.hpp" #include "Controllers/Keyboard.hpp" -#include "Canvas.hpp" #include "Camera/Camera2D.hpp" #include "Camera/Camera3D.hpp" -#include "Drawables/Texture.hpp" #include "Color.hpp" +#include "Canvas.hpp" +#include "Drawables/IDrawable.hpp" +#include "Drawables/Texture.hpp" namespace RAY { class Window: public Canvas { diff --git a/lib/Ray/src/Drawables/2D/Triangle.cpp b/lib/Ray/src/Drawables/2D/Triangle.cpp index 3fcbf195..71a4dbc2 100644 --- a/lib/Ray/src/Drawables/2D/Triangle.cpp +++ b/lib/Ray/src/Drawables/2D/Triangle.cpp @@ -8,7 +8,7 @@ #include "Drawables/2D/Triangle.hpp" #include -RAY::Drawables::Drawables2D::Triangle::Triangle(const Vector2 &positionA, Vector2 positionB, Vector2 positionC,int length, const Color &color): +RAY::Drawables::Drawables2D::Triangle::Triangle(const Vector2 &positionA, Vector2 positionB, Vector2 positionC, const Color &color): ADrawable2D(positionA, color), _posB(positionB), _posC(positionC) { @@ -55,6 +55,7 @@ void RAY::Drawables::Drawables2D::Triangle::drawOn(RAY::Window &window) void RAY::Drawables::Drawables2D::Triangle::drawOn(RAY::Image &image) { + (void)image; throw std::exception(); }