From ca4f4048df3adab01cb114e286fa68404b07e016 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Tue, 24 Nov 2020 22:30:59 +0100 Subject: [PATCH] Adjusted scene (more objects, mixed boxes and spheres) --- src/simulator.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/simulator.cc b/src/simulator.cc index 5eb765f..5440d51 100644 --- a/src/simulator.cc +++ b/src/simulator.cc @@ -45,11 +45,11 @@ void simulator_init() { double restitution = 0.3; - int num_bodies = 5; + int num_bodies = 10; for (int i = 0; i < num_bodies; i++) { SimBody body; - bool create_sphere = false; + bool create_sphere = i %2; if (!create_sphere) { body = CreateBoxBody( @@ -102,7 +102,7 @@ void simulator_reset() { for (int i = 0; i < sWorld.mBodies.size(); i++) { sWorld.mBodies[i].q.block(0, 0, 3, 1) = - Vector3d::Random() * 0.3 + Vector3d(0., 5., 0.); + Vector3d::Random() * 2.5 + Vector3d(0., 5., 0.); sWorld.mBodies[i].q[2] = 0.; }