-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (26 loc) · 739 Bytes
/
main.cpp
File metadata and controls
33 lines (26 loc) · 739 Bytes
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
#include "vec.h"
#include "cube.h"
#include <iostream>
void test1() {
Cube c1, c2;
{
c2.m_translation = vec4(2.001, 1.999, -0.141211, 1.0f);
c2.m_scale = vec4(0.815121, 1, 1.16, 1);
c2.m_rotation = vec4(0.158525, -0.133174, -0.222687, 0.952652);
}
std::cout << std::boolalpha << "C1 collision with C2 " << c1.Collision(c2) << ". It should be true" << std::endl;
}
void test2() {
Cube c1, c2;
{
c2.m_translation = vec4(2.001, 1.999, -0.141211, 1.0f);
c2.m_scale = vec4(0.815121, 1, 1.13318, 1);
c2.m_rotation = vec4(0.158525, -0.133174, -0.222687, 0.952652);
}
std::cout << std::boolalpha << "C1 collision with C2 " << c1.Collision(c2) << ". It should be false" << std::endl;
}
int main()
{
test1();
test2();
}