From 90bf0134de17ba055b12dc6fce9c46cd9db15085 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Wed, 8 Feb 2017 15:01:03 -0700 Subject: [PATCH] common: move vec3_t_to_glm() to mathlib.hh --- common/bsputils.cc | 4 ---- include/common/mathlib.hh | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/bsputils.cc b/common/bsputils.cc index 01e315f0..db6c5219 100644 --- a/common/bsputils.cc +++ b/common/bsputils.cc @@ -261,10 +261,6 @@ EdgePlanes_PointInside(const bsp2_dface_t *face, const plane_t *edgeplanes, cons using namespace glm; -static glm::vec3 vec3_t_to_glm(const vec3_t vec) { - return glm::vec3(vec[0], vec[1], vec[2]); -} - glm::vec4 Face_Plane_E(const bsp2_t *bsp, const bsp2_dface_t *f) { const vec3 p0 = Face_PointAtIndex_E(bsp, f, 0); diff --git a/include/common/mathlib.hh b/include/common/mathlib.hh index fe3e5fc8..5cf533b9 100644 --- a/include/common/mathlib.hh +++ b/include/common/mathlib.hh @@ -307,6 +307,10 @@ float Lanczos2D(float x, float y, float a); // glm geometry +static inline glm::vec3 vec3_t_to_glm(const vec3_t vec) { + return glm::vec3(vec[0], vec[1], vec[2]); +} + glm::vec3 GLM_FaceNormal(std::vector points); std::vector GLM_MakeInwardFacingEdgePlanes(std::vector points); bool GLM_EdgePlanes_PointInside(const std::vector &edgeplanes, const glm::vec3 &point);