diff options
Diffstat (limited to 'src/mbgl/util/vec4.cpp')
-rw-r--r-- | src/mbgl/util/vec4.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/mbgl/util/vec4.cpp b/src/mbgl/util/vec4.cpp deleted file mode 100644 index bee4eaf976..0000000000 --- a/src/mbgl/util/vec4.cpp +++ /dev/null @@ -1,33 +0,0 @@ -// This is an incomplete port of http://glmatrix.net/ -// -// Copyright (c) 2013 Brandon Jones, Colin MacKenzie IV -// -// This software is provided 'as-is', without any express or implied warranty. -// In no event will the authors be held liable for any damages arising from the -// use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not claim -// that you wrote the original software. If you use this software in a -// product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. - -#include <mbgl/util/vec4.hpp> - -using namespace mbgl; - -void matrix::transformMat4(vec4& out, vec4& a, mat4& m) { - double x = a[0], y = a[1], z = a[2], w = a[3]; - out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; - out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; - out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; - out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; -} |