Skip to content

Commit 681b9cf

Browse files
committed
chore: fix warnings
1 parent ae2b605 commit 681b9cf

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

benchmarks2d/convex_polygons2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rand::distributions::{Distribution, Standard};
1+
use rand::distr::{Distribution, StandardUniform};
22
use rand::{SeedableRng, rngs::StdRng};
33
use rapier_testbed2d::Testbed;
44
use rapier2d::prelude::*;
@@ -48,7 +48,7 @@ pub fn init_world(testbed: &mut Testbed) {
4848
let centery = shift / 2.0;
4949

5050
let mut rng = StdRng::seed_from_u64(0);
51-
let distribution = Standard;
51+
let distribution = StandardUniform;
5252

5353
for i in 0..num {
5454
for j in 0usize..num * 5 {

src/geometry/broad_phase_bvh.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use crate::dynamics::{IntegrationParameters, RigidBodySet};
22
use crate::geometry::{Aabb, BroadPhasePairEvent, ColliderHandle, ColliderPair, ColliderSet};
33
use crate::math::Real;
4-
use parry::bounding_volume::BoundingVolume;
54
use parry::partitioning::{Bvh, BvhWorkspace};
65
use parry::utils::hashmap::{Entry, HashMap};
76

@@ -251,6 +250,10 @@ impl BroadPhaseBvh {
251250
// );
252251
}
253252

253+
/// Sets the AABB associated to the given collider.
254+
///
255+
/// The AABB change will be immediately applied and propagated through the underlying BVH.
256+
/// Change detection will automatically take it into account during the next broad-phase update.
254257
pub fn set_aabb(&mut self, params: &IntegrationParameters, handle: ColliderHandle, aabb: Aabb) {
255258
let change_detection_skin = if Self::CHANGE_DETECTION_ENABLED {
256259
Self::CHANGE_DETECTION_FACTOR * params.length_unit

src_testbed/testbed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use rapier::dynamics::{
2323
RigidBodyHandle, RigidBodySet,
2424
};
2525
#[cfg(feature = "dim3")]
26-
use rapier::geometry::{BroadPhaseBvh, Ray};
26+
use rapier::geometry::Ray;
2727
use rapier::geometry::{ColliderHandle, ColliderSet, NarrowPhase};
2828
use rapier::math::{Real, Vector};
2929
use rapier::pipeline::PhysicsHooks;

0 commit comments

Comments
 (0)