diff options
| author | Crozet Sébastien <developer@crozet.re> | 2020-09-28 10:19:49 +0200 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2020-09-28 10:24:42 +0200 |
| commit | e7466e2f6923d24e987a34f8ebaf839346af8d4e (patch) | |
| tree | fa25c9c94bf4cd18a84f1a8c2bea327cd875af5f /examples2d/heightfield2.rs | |
| parent | 0829ed10ac33bd3697fe2f92dd6b8f55df1094b4 (diff) | |
| download | rapier-e7466e2f6923d24e987a34f8ebaf839346af8d4e.tar.gz rapier-e7466e2f6923d24e987a34f8ebaf839346af8d4e.tar.bz2 rapier-e7466e2f6923d24e987a34f8ebaf839346af8d4e.zip | |
Move 2D benchmarks into their own directory/crate.
Diffstat (limited to 'examples2d/heightfield2.rs')
| -rw-r--r-- | examples2d/heightfield2.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples2d/heightfield2.rs b/examples2d/heightfield2.rs index 95fed6c..f5ddff9 100644 --- a/examples2d/heightfield2.rs +++ b/examples2d/heightfield2.rs @@ -19,7 +19,7 @@ pub fn init_world(testbed: &mut Testbed) { let heights = DVector::from_fn(nsubdivs + 1, |i, _| { if i == 0 || i == nsubdivs { - 80.0 + 8.0 } else { (i as f32 * ground_size.x / (nsubdivs as f32)).cos() * 2.0 } @@ -33,7 +33,7 @@ pub fn init_world(testbed: &mut Testbed) { /* * Create the cubes */ - let num = 26; + let num = 20; let rad = 0.5; let shift = rad * 2.0; @@ -41,7 +41,7 @@ pub fn init_world(testbed: &mut Testbed) { let centery = shift / 2.0; for i in 0..num { - for j in 0usize..num * 5 { + for j in 0usize..num { let x = i as f32 * shift - centerx; let y = j as f32 * shift + centery + 3.0; @@ -63,7 +63,7 @@ pub fn init_world(testbed: &mut Testbed) { * Set up the testbed. */ testbed.set_world(bodies, colliders, joints); - testbed.look_at(Point2::new(0.0, 50.0), 10.0); + testbed.look_at(Point2::new(0.0, 0.0), 10.0); } fn main() { |
