diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-06 13:16:05 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:54 +0200 |
commit | 0e40bc7ce8c3b3be083002f88c3317d65f6570ad (patch) | |
tree | 2fcc470a0f1ce1d51ff26c53c8a9a890b3f31b3b /src/interfaces/vector2.hpp | |
parent | f4d812a5b9131e65bb55db7211dc68fc453792df (diff) |
refactor: make vector2 & bounds data classes
Diffstat (limited to 'src/interfaces/vector2.hpp')
-rw-r--r-- | src/interfaces/vector2.hpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/interfaces/vector2.hpp b/src/interfaces/vector2.hpp deleted file mode 100644 index dfd369f..0000000 --- a/src/interfaces/vector2.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#pragma once - -#include <memory> - -class IVector2 -{ -public: - virtual ~IVector2() = default; - - /** - * Returns the X coordinate. - */ - [[nodiscard]] virtual unsigned int x() const = 0; - - /** - * Sets the X coordinate. - * - * @param x A new X coordinate - */ - virtual void x(unsigned int x) = 0; - - /** - * Returns the Y coordinate. - */ - [[nodiscard]] virtual unsigned int y() const = 0; - - /** - * Sets the Y coordinate. - * - * @param Y A new Y coordinate - */ - virtual void y(unsigned int y) = 0; - - virtual const IVector2 &operator+=(const IVector2 &vector2) = 0; - virtual const IVector2 &operator-=(const IVector2 &vector2) = 0; -}; - -struct IVector2Options -{ - unsigned int x; - unsigned int y; -}; - -using IVector2Factory = std::shared_ptr<IVector2> (*)(const IVector2Options &options); |