From 33f24d6b176be2a5cc43f61c86c3ecc2a4faed24 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Sat, 17 Feb 2018 23:04:08 +0100 Subject: [PATCH] [DEV] basic update --- test/testCollisionWorld.cpp | 9 ++++++--- test/testRaycast.cpp | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/test/testCollisionWorld.cpp b/test/testCollisionWorld.cpp index bc227d4..8adec6b 100644 --- a/test/testCollisionWorld.cpp +++ b/test/testCollisionWorld.cpp @@ -38,13 +38,16 @@ class WorldCollisionCallback : public ephysics::CollisionCallback { if (isContactBetweenBodies(boxBody, sphere1Body, _contactPointInfo)) { TEST_WARNING("plop 1 boxCollideWithSphere1"); boxCollideWithSphere1 = true; - } else if (isContactBetweenBodies(boxBody, cylinderBody, _contactPointInfo)) { + } + if (isContactBetweenBodies(boxBody, cylinderBody, _contactPointInfo)) { TEST_WARNING("plop 2 boxCollideWithCylinder"); boxCollideWithCylinder = true; - } else if (isContactBetweenBodies(sphere1Body, cylinderBody, _contactPointInfo)) { + } + if (isContactBetweenBodies(sphere1Body, cylinderBody, _contactPointInfo)) { TEST_WARNING("plop 3 sphere1CollideWithCylinder"); sphere1CollideWithCylinder = true; - } else if (isContactBetweenBodies(sphere1Body, sphere2Body, _contactPointInfo)) { + } + if (isContactBetweenBodies(sphere1Body, sphere2Body, _contactPointInfo)) { TEST_WARNING("plop 4 sphere1CollideWithSphere2"); sphere1CollideWithSphere2 = true; } diff --git a/test/testRaycast.cpp b/test/testRaycast.cpp index 7e713b9..8220054 100644 --- a/test/testRaycast.cpp +++ b/test/testRaycast.cpp @@ -243,7 +243,9 @@ class TestRaycast { // Heightfield shape (plane height field at height=4) - for (int32_t i=0; i<100; i++) m_heightFieldData[i] = 4; + for (int32_t i=0; i<100; i++) { + m_heightFieldData[i] = 4; + } m_heightFieldShape = ETK_NEW(ephysics::HeightFieldShape, 10, 10, 0, 4, m_heightFieldData, ephysics::HeightFieldShape::HEIGHT_FLOAT_TYPE); m_heightFieldProxyShape = m_heightFieldBody->addCollisionShape(m_heightFieldShape, m_shapeTransform);