diff options
| author | Thierry Berger <contact@thierryberger.com> | 2024-11-19 16:33:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-19 16:33:26 +0100 |
| commit | 510237cc29ebc667a8c158ef0340b7d1aa669a72 (patch) | |
| tree | 772daf3fac2e463eba254900001fce5a659f2f92 /src_testbed/box2d_backend.rs | |
| parent | ff79f4c67478f8c8045464cac22f9e57388cd4a0 (diff) | |
| download | rapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.tar.gz rapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.tar.bz2 rapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.zip | |
Profiling support (#743)
Diffstat (limited to 'src_testbed/box2d_backend.rs')
| -rw-r--r-- | src_testbed/box2d_backend.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src_testbed/box2d_backend.rs b/src_testbed/box2d_backend.rs index b9bc97e..bd6aa13 100644 --- a/src_testbed/box2d_backend.rs +++ b/src_testbed/box2d_backend.rs @@ -28,6 +28,7 @@ pub struct Box2dWorld { } impl Box2dWorld { + #[profiling::function] pub fn from_rapier( gravity: Vector2<f32>, bodies: &RigidBodySet, @@ -221,6 +222,7 @@ impl Box2dWorld { } } + #[profiling::function] pub fn step(&mut self, counters: &mut Counters, params: &IntegrationParameters) { counters.step_started(); self.world @@ -228,6 +230,7 @@ impl Box2dWorld { counters.step_completed(); } + #[profiling::function] pub fn sync(&self, bodies: &mut RigidBodySet, colliders: &mut ColliderSet) { for (handle, body) in bodies.iter_mut() { if let Some(pb2_handle) = self.rapier2box2d.get(&handle) { |
