From a30151231f9c894e4a796da056589143b5650723 Mon Sep 17 00:00:00 2001 From: Cirilo Bernardo Date: Tue, 15 Mar 2016 11:38:55 +1100 Subject: [PATCH] Fix invocation of glm::cross and glm::normalize --- 3d-viewer/3d_cache/sg/ifsg_api.cpp | 4 ++-- 3d-viewer/3d_cache/sg/sg_helpers.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/3d-viewer/3d_cache/sg/ifsg_api.cpp b/3d-viewer/3d_cache/sg/ifsg_api.cpp index d4efd285f7..734a88ce6d 100644 --- a/3d-viewer/3d_cache/sg/ifsg_api.cpp +++ b/3d-viewer/3d_cache/sg/ifsg_api.cpp @@ -647,8 +647,8 @@ SGVECTOR S3D::CalcTriNorm( const SGPOINT& p1, const SGPOINT& p2, const SGPOINT& return SGVECTOR( 0.0, 0.0, 1.0 ); // normal - tri = cross( pts[1] - pts[0], pts[2] - pts[0] ); - normalize( tri ); + tri = glm::cross( pts[1] - pts[0], pts[2] - pts[0] ); + glm::normalize( tri ); return SGVECTOR( tri.x, tri.y, tri.z ); } diff --git a/3d-viewer/3d_cache/sg/sg_helpers.cpp b/3d-viewer/3d_cache/sg/sg_helpers.cpp index 184fd0c391..8b0ca0edd5 100644 --- a/3d-viewer/3d_cache/sg/sg_helpers.cpp +++ b/3d-viewer/3d_cache/sg/sg_helpers.cpp @@ -375,7 +375,7 @@ static void calcTriad( glm::dvec3* pts, glm::dvec3& tri ) } // normal * 2 * area - tri = cross( pts[1] - pts[0], pts[2] - pts[0] ); + tri = glm::cross( pts[1] - pts[0], pts[2] - pts[0] ); return; }