This commit is contained in:
arthur.jamet
2021-05-17 08:54:43 +02:00
parent 915fa940c5
commit 322ca4d710
2 changed files with 55 additions and 0 deletions
+1
View File
@@ -44,6 +44,7 @@ set(HEADERS
include/Drawables/2D/Triangle.hpp
include/Drawables/3D/Circle.hpp
include/Drawables/3D/Cylinder.hpp
include/Drawables/3D/Grid.hpp
include/Drawables/3D/Line.hpp
include/Drawables/3D/Plane.hpp
include/Drawables/3D/Point.hpp
+54
View File
@@ -0,0 +1,54 @@
/*
** EPITECH PROJECT, 2021
** Bomberman
** File description:
** Grid
*/
#ifndef GRID_HPP_
#define GRID_HPP_
#include "Drawables/ADrawable3D.hpp"
namespace RAY::Drawable3D {
//! @brief a grid (centered at (0, 0, 0))
class Grid: public ADrawable3D
{
public:
//! @brief Grid constructor
//! @param slices slices of the grid
//! @param spacing spacing of slices
Grid(int slices, float spacing);
//! @brief A default copy constructor
Grid(const Grid &) = default;
//! @brief A Grid is assignable
Grid &operator=(const Grid &) = default;
//! @brief A default destructor
~Grid() = default;
//! @return the slices of the Grid
int getSlices(void) const;
//! @return the spacing of the Grid
float getSpacing(void) const;
//! @brief Set slices
Grid &setSlices(int slices);
//! @brief Set spacing
Grid &setSpacing(float spacing);
private:
//! @brief Grid slices
int _slices;
//! @brief Slices spacing
float _spacing;
};
};
#endif /* !GRID_HPP_ */