diff options
| author | Sébastien Crozet <developer@crozet.re> | 2020-09-28 10:58:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-28 10:58:35 +0200 |
| commit | 90dffc59ed45e5b95c2a40699cb91d285a206e0e (patch) | |
| tree | fa25c9c94bf4cd18a84f1a8c2bea327cd875af5f /examples3d/stacks3.rs | |
| parent | 3080c6e7d2e7bad0ac55095ccc24b1ac8bd5449a (diff) | |
| parent | e7466e2f6923d24e987a34f8ebaf839346af8d4e (diff) | |
| download | rapier-90dffc59ed45e5b95c2a40699cb91d285a206e0e.tar.gz rapier-90dffc59ed45e5b95c2a40699cb91d285a206e0e.tar.bz2 rapier-90dffc59ed45e5b95c2a40699cb91d285a206e0e.zip | |
Merge pull request #20 from dimforge/benchbot
Split benchmarks from examples
Diffstat (limited to 'examples3d/stacks3.rs')
| -rw-r--r-- | examples3d/stacks3.rs | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/examples3d/stacks3.rs b/examples3d/stacks3.rs index fd2ae27..55d58bb 100644 --- a/examples3d/stacks3.rs +++ b/examples3d/stacks3.rs @@ -27,9 +27,8 @@ fn create_tower_circle( // Build the rigid body. let rigid_body = RigidBodyBuilder::new_dynamic().position(pos).build(); let handle = bodies.insert(rigid_body); - let collider = ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z) - .density(1.0) - .build(); + let collider = + ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z).build(); colliders.insert(collider, handle, bodies); } } @@ -55,9 +54,8 @@ fn create_wall( // Build the rigid body. let rigid_body = RigidBodyBuilder::new_dynamic().translation(x, y, z).build(); let handle = bodies.insert(rigid_body); - let collider = ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z) - .density(1.0) - .build(); + let collider = + ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z).build(); colliders.insert(collider, handle, bodies); } } @@ -88,9 +86,7 @@ fn create_pyramid( let rigid_body = RigidBodyBuilder::new_dynamic().translation(x, y, z).build(); let handle = bodies.insert(rigid_body); let collider = - ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z) - .density(1.0) - .build(); + ColliderBuilder::cuboid(half_extents.x, half_extents.y, half_extents.z).build(); colliders.insert(collider, handle, bodies); } } @@ -124,27 +120,7 @@ pub fn init_world(testbed: &mut Testbed) { let cube_size = 1.0; let hext = Vector3::repeat(cube_size); let bottomy = cube_size * 50.0; - create_pyramid( - &mut bodies, - &mut colliders, - Vector3::new(-110.0, bottomy, 0.0), - 12, - hext, - ); - create_pyramid( - &mut bodies, - &mut colliders, - Vector3::new(-80.0, bottomy, 0.0), - 12, - hext, - ); - create_pyramid( - &mut bodies, - &mut colliders, - Vector3::new(-50.0, bottomy, 0.0), - 12, - hext, - ); + create_pyramid( &mut bodies, &mut colliders, |
