From b5a641d60f022a1778d4260c2e55b9d97817a8f9 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 9 Apr 2014 10:04:19 -0700 Subject: [PATCH] add back Util code blown away in merge --- interface/src/Util.cpp | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/interface/src/Util.cpp b/interface/src/Util.cpp index 4fe5636329..36e39a46a5 100644 --- a/interface/src/Util.cpp +++ b/interface/src/Util.cpp @@ -9,6 +9,38 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include "InterfaceConfig.h" +#include "ui/TextRenderer.h" +#include "VoxelConstants.h" +#include "world.h" + +#include "Util.h" + +using namespace std; + +// no clue which versions are affected... +#define WORKAROUND_BROKEN_GLUT_STROKES +// see http://www.opengl.org/resources/libraries/glut/spec3/node78.html + +void eulerToOrthonormals(glm::vec3 * angles, glm::vec3 * front, glm::vec3 * right, glm::vec3 * up) { + // + // Converts from three euler angles to the associated orthonormal vectors + // + // Angles contains (pitch, yaw, roll) in radians + // + // First, create the quaternion associated with these euler angles glm::quat q(glm::vec3(angles->x, -(angles->y), angles->z)); @@ -597,4 +629,4 @@ bool pointInSphere(glm::vec3& point, glm::vec3& sphereCenter, double sphereRadiu return true; } return false; -} +} \ No newline at end of file