diff options
| author | Crozet Sébastien <developer@crozet.re> | 2020-12-08 17:31:49 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2020-12-29 11:31:00 +0100 |
| commit | 9bf1321f8f1d2e116f44c2461a53f302c4ef4171 (patch) | |
| tree | 8070529f4b48074fd40defb6062d6615dcdb61c5 /benchmarks3d/heightfield3.rs | |
| parent | fd3b4801b63fd56369ff37bdc2e5189db159e8ff (diff) | |
| download | rapier-9bf1321f8f1d2e116f44c2461a53f302c4ef4171.tar.gz rapier-9bf1321f8f1d2e116f44c2461a53f302c4ef4171.tar.bz2 rapier-9bf1321f8f1d2e116f44c2461a53f302c4ef4171.zip | |
Outsource the contact manifold, SAT, and some shapes.
Diffstat (limited to 'benchmarks3d/heightfield3.rs')
| -rw-r--r-- | benchmarks3d/heightfield3.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/benchmarks3d/heightfield3.rs b/benchmarks3d/heightfield3.rs index 4f8211c..fc64856 100644 --- a/benchmarks3d/heightfield3.rs +++ b/benchmarks3d/heightfield3.rs @@ -1,4 +1,4 @@ -use na::{DMatrix, Point3, Vector3}; +use na::{ComplexField, DMatrix, Point3, Vector3}; use rapier3d::dynamics::{JointSet, RigidBodyBuilder, RigidBodySet}; use rapier3d::geometry::{ColliderBuilder, ColliderSet}; use rapier_testbed3d::Testbed; @@ -23,7 +23,11 @@ pub fn init_world(testbed: &mut Testbed) { } else { let x = i as f32 * ground_size.x / (nsubdivs as f32); let z = j as f32 * ground_size.z / (nsubdivs as f32); - x.sin() + z.cos() + + // NOTE: make sure we use the sin/cos from simba to ensure + // cross-platform determinism of the example when the + // enhanced_determinism feature is enabled. + <f32 as ComplexField>::sin(x) + <f32 as ComplexField>::cos(z) } }); |
