From 1feb186204bfc2f0562453a71cf9de799bad54f4 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Tue, 30 Jul 2019 17:43:24 -0700 Subject: [PATCH 1/3] Update PhysicsClientC_API.cpp use B3_PI definition --- examples/SharedMemory/PhysicsClientC_API.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/SharedMemory/PhysicsClientC_API.cpp b/examples/SharedMemory/PhysicsClientC_API.cpp index aed794cf2..d72b35bef 100644 --- a/examples/SharedMemory/PhysicsClientC_API.cpp +++ b/examples/SharedMemory/PhysicsClientC_API.cpp @@ -4142,7 +4142,7 @@ B3_SHARED_API void b3ComputeProjectionMatrix(float left, float right, float bott B3_SHARED_API void b3ComputeProjectionMatrixFOV(float fov, float aspect, float nearVal, float farVal, float projectionMatrix[16]) { - float yScale = 1.0 / tan((3.141592538 / 180.0) * fov / 2); + float yScale = 1.0 / tan((B3_PI / 180.0) * fov / 2); float xScale = yScale / aspect; projectionMatrix[0 * 4 + 0] = xScale; From a8e1be3b335cad802ac2a349936f0ecbf5c461d4 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Tue, 30 Jul 2019 17:48:59 -0700 Subject: [PATCH 2/3] Update TinyRenderer.cpp create a cube using x,y,z not x,y,y --- examples/TinyRenderer/TinyRenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/TinyRenderer/TinyRenderer.cpp b/examples/TinyRenderer/TinyRenderer.cpp index eecc42577..f98362d96 100644 --- a/examples/TinyRenderer/TinyRenderer.cpp +++ b/examples/TinyRenderer/TinyRenderer.cpp @@ -396,7 +396,7 @@ void TinyRenderObjectData::createCube(float halfExtentsX, float halfExtentsY, fl { m_model->addVertex(halfExtentsX * cube_vertices_textured[i * 9], halfExtentsY * cube_vertices_textured[i * 9 + 1], - halfExtentsY * cube_vertices_textured[i * 9 + 2], + halfExtentsZ * cube_vertices_textured[i * 9 + 2], cube_vertices_textured[i * 9 + 4], cube_vertices_textured[i * 9 + 5], cube_vertices_textured[i * 9 + 6], From 789769eac925d1052c94316e0d9b1d916a689998 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Wed, 31 Jul 2019 09:18:38 -0700 Subject: [PATCH 3/3] Update BulletMJCFImporter.cpp add default for unhandled geoms --- examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp b/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp index 7f5b10106..d630f8599 100644 --- a/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp +++ b/examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp @@ -2522,6 +2522,9 @@ class btCompoundShape* BulletMJCFImporter::convertLinkCollisionShapes(int linkIn { break; } + default: + { + } } // switch geom