src/matrix.cpp

Sun, 19 Jan 2020 13:53:07 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 19 Jan 2020 13:53:07 +0200
changeset 23
3387a84ddaba
parent 21
0133e565e072
child 24
1a0faaaceb84
permissions
-rw-r--r--

fixed a pile of nonsense that caused subfiles to go haywire

#include "matrix.h"
#include "vertex.h"

Matrix4x4 combine(const Matrix3x3& topLeft, const Point3D& translation)
{
	return {{
		{topLeft(0, 0), topLeft(0, 1), topLeft(0, 2), translation.x},
		{topLeft(1, 0), topLeft(1, 1), topLeft(1, 2), translation.y},
		{topLeft(2, 0), topLeft(2, 1), topLeft(2, 2), translation.z},
		{0, 0, 0, 1}
	}};
}

mercurial