#pragma once #include "engine/data/bounds.hpp" #include "engine/data/vector2.hpp" #include template class IMatrix { public: virtual ~IMatrix() noexcept = default; /** * Fills the matrix with a element. * * @param element A element */ virtual void fill(Element element) noexcept = 0; /** * Returns a element of the matrix. * * @param pos The position of a element */ [[nodiscard]] virtual Element get(const Vector2 &pos) const noexcept = 0; /** * Sets a element of the matrix. * * @param pos The position of a element * @param element A new element */ virtual void set(const Vector2 &pos, Element element) noexcept = 0; /** * Returns the number of rows the matrix has. */ [[nodiscard]] virtual uint32_t rows() const noexcept = 0; /** * Returns the number of columns the matrix has. */ [[nodiscard]] virtual uint32_t columns() const noexcept = 0; }; template using IMatrixFactory = std::shared_ptr> (*)(const Bounds &bounds);