src/matrix.cpp

Wed, 01 Jan 2020 17:45:56 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Wed, 01 Jan 2020 17:45:56 +0200
changeset 21
0133e565e072
parent 8
44679e468ba9
child 24
1a0faaaceb84
permissions
-rw-r--r--

things

8
44679e468ba9 major update with many things
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #include "matrix.h"
21
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
2 #include "vertex.h"
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
3
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
4 Matrix4x4 combine(const Matrix3x3& topLeft, const Point3D& translation)
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
5 {
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
6 return {{
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
7 {topLeft(0, 0), topLeft(0, 1), topLeft(0, 2), translation.x},
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
8 {topLeft(1, 0), topLeft(1, 1), topLeft(1, 2), translation.y},
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
9 {topLeft(2, 0), topLeft(2, 1), topLeft(2, 2), translation.z},
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
10 {0, 0, 0, 1}
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
11 }};
Teemu Piippo <teemu@hecknology.net>
parents: 8
diff changeset
12 }

mercurial