overte-AleziaKurdis/tests/GLMTestUtils.h
2015-08-12 13:51:40 -07:00

28 lines
729 B
C

//
// GLMTestUtils.h
// tests/physics/src
//
// Created by Seiji Emery on 6/22/15
// Copyright 2015 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_GLMTestUtils_h
#define hifi_GLMTestUtils_h
#include <glm/glm.hpp>
#include <glm/gtx/quaternion.hpp>
// Implements functionality in QTestExtensions.h for glm types
inline float getErrorDifference(const glm::vec3& a, const glm::vec3& b) {
return glm::distance(a, b);
}
inline QTextStream& operator<<(QTextStream& stream, const glm::vec3& v) {
return stream << "glm::vec3 { " << v.x << ", " << v.y << ", " << v.z << " }";
}
#endif