sKit  0.0.9
grids.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <glm/vec2.hpp>
4 #include <vector>
5 
6 namespace sKit {
7 namespace structure {
8 
26 auto gridFillDiagonal(int numCols, int numRows) -> std::vector<glm::ivec2>;
27 
29 constexpr glm::ivec2 N(0, -1);
31 constexpr glm::ivec2 E(1, 0);
33 constexpr glm::ivec2 S(0, 1);
35 constexpr glm::ivec2 W(-1, 0);
37 constexpr glm::ivec2 NE(1, -1);
39 constexpr glm::ivec2 SW(-1, 1);
40 
41 } // namespace Kit
42 } // namespace s
sKit::structure::NE
constexpr glm::ivec2 NE(1, -1)
Unit int vector North-East.
sKit::structure::N
constexpr glm::ivec2 N(0, -1)
Unit int vector North.
sKit::structure::S
constexpr glm::ivec2 S(0, 1)
Unit int vector South.
sKit::structure::gridFillDiagonal
auto gridFillDiagonal(int numCols, int numRows) -> std::vector< glm::ivec2 >
Creates a path following the coordinates of every cell in a grid that has a diagonal tendency.
Definition: grids.cpp:8
sKit::structure::E
constexpr glm::ivec2 E(1, 0)
Unit int vector East.
sKit
Definition: camera.hpp:8
sKit::structure::W
constexpr glm::ivec2 W(-1, 0)
Unit int vector West.
sKit::structure::SW
constexpr glm::ivec2 SW(-1, 1)
Unit int vector South-West.