From 49f7c99c7786ce257fae28dfeae2f8ee5810424c Mon Sep 17 00:00:00 2001 From: Branimir Karadžić Date: Wed, 29 Mar 2017 17:09:40 +0200 Subject: Update BGFX and BX (nw) --- 3rdparty/bgfx/examples/common/bounds.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '3rdparty/bgfx/examples/common/bounds.cpp') diff --git a/3rdparty/bgfx/examples/common/bounds.cpp b/3rdparty/bgfx/examples/common/bounds.cpp index 6afd5755d0c..0240da2861e 100644 --- a/3rdparty/bgfx/examples/common/bounds.cpp +++ b/3rdparty/bgfx/examples/common/bounds.cpp @@ -9,7 +9,7 @@ void aabbToObb(Obb& _obb, const Aabb& _aabb) { - memset(_obb.m_mtx, 0, sizeof(_obb.m_mtx) ); + bx::memSet(_obb.m_mtx, 0, sizeof(_obb.m_mtx) ); _obb.m_mtx[ 0] = (_aabb.m_max[0] - _aabb.m_min[0]) * 0.5f; _obb.m_mtx[ 5] = (_aabb.m_max[1] - _aabb.m_min[1]) * 0.5f; _obb.m_mtx[10] = (_aabb.m_max[2] - _aabb.m_min[2]) * 0.5f; @@ -91,7 +91,7 @@ void aabbTransformToObb(Obb& _obb, const Aabb& _aabb, const float* _mtx) aabbToObb(_obb, _aabb); float result[16]; bx::mtxMul(result, _obb.m_mtx, _mtx); - memcpy(_obb.m_mtx, result, sizeof(result) ); + bx::memCopy(_obb.m_mtx, result, sizeof(result) ); } void toAabb(Aabb& _aabb, const void* _vertices, uint32_t _numVertices, uint32_t _stride) @@ -252,7 +252,7 @@ void calcObb(Obb& _obb, const void* _vertices, uint32_t _numVertices, uint32_t _ ax += angleStep; } - memcpy(&_obb, &best, sizeof(Obb) ); + bx::memCopy(&_obb, &best, sizeof(Obb) ); } void calcMaxBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _numVertices, uint32_t _stride) @@ -282,7 +282,7 @@ void calcMaxBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _num } bx::vec3Move(_sphere.m_center, center); - _sphere.m_radius = sqrtf(maxDistSq); + _sphere.m_radius = bx::fsqrt(maxDistSq); } void calcMinBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _numVertices, uint32_t _stride, float _step) -- cgit v1.2.3-70-g09d2