-
Notifications
You must be signed in to change notification settings - Fork 1
/
Config.cpp
38 lines (32 loc) · 854 Bytes
/
Config.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "Config.hpp"
GlobalStacks _stacks;
std::ostream &operator<<(std::ostream &os, const glm::vec2 &p)
{
return os << "(" << p.x << ", " << p.y << ")";
}
std::ostream &operator<<(std::ostream &os, const glm::vec3 &p)
{
return os << "(" << p.x << ", " << p.y << ", " << p.z << ")";
}
std::ostream &operator<<(std::ostream &os, const glm::vec4 &p)
{
return os << "(" << p.x << ", " << p.y << ", " << p.z << ", " << p.w << " | LEN=" << glm::length(p) << ")";
}
std::ostream &operator<<(std::ostream &os, const glm::mat4 &m)
{
os << "[ ";
for (int row = 0; row < 4; row++)
{
for (int col = 0; col < 4; col++)
{
os << m[col][row] << " ";
}
if (row != 3)
os << std::endl << " ";
}
return os << "]" << std::endl;
}
GlobalStacks &stacks()
{
return _stacks;
}