aboutsummaryrefslogtreecommitdiff
path: root/src/control/ray_cast_vehicle_controller.rs
diff options
context:
space:
mode:
authorThierry Berger <contact@thierryberger.com>2024-11-19 16:33:26 +0100
committerGitHub <noreply@github.com>2024-11-19 16:33:26 +0100
commit510237cc29ebc667a8c158ef0340b7d1aa669a72 (patch)
tree772daf3fac2e463eba254900001fce5a659f2f92 /src/control/ray_cast_vehicle_controller.rs
parentff79f4c67478f8c8045464cac22f9e57388cd4a0 (diff)
downloadrapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.tar.gz
rapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.tar.bz2
rapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.zip
Profiling support (#743)
Diffstat (limited to 'src/control/ray_cast_vehicle_controller.rs')
-rw-r--r--src/control/ray_cast_vehicle_controller.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/control/ray_cast_vehicle_controller.rs b/src/control/ray_cast_vehicle_controller.rs
index 98b6339..eaa506b 100644
--- a/src/control/ray_cast_vehicle_controller.rs
+++ b/src/control/ray_cast_vehicle_controller.rs
@@ -321,6 +321,7 @@ impl DynamicRayCastVehicleController {
wheel.wheel_axle_ws = chassis_transform * wheel.axle_cs;
}
+ #[profiling::function]
fn ray_cast(
&mut self,
bodies: &RigidBodySet,
@@ -403,6 +404,7 @@ impl DynamicRayCastVehicleController {
}
/// Updates the vehicle’s velocity based on its suspension, engine force, and brake.
+ #[profiling::function]
pub fn update_vehicle(
&mut self,
dt: Real,
@@ -531,6 +533,7 @@ impl DynamicRayCastVehicleController {
}
}
+ #[profiling::function]
fn update_friction(&mut self, bodies: &mut RigidBodySet, colliders: &ColliderSet, dt: Real) {
let num_wheels = self.wheels.len();