aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/joint/impulse_joint
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/dynamics/joint/impulse_joint
parentff79f4c67478f8c8045464cac22f9e57388cd4a0 (diff)
downloadrapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.tar.gz
rapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.tar.bz2
rapier-510237cc29ebc667a8c158ef0340b7d1aa669a72.zip
Profiling support (#743)
Diffstat (limited to 'src/dynamics/joint/impulse_joint')
-rw-r--r--src/dynamics/joint/impulse_joint/impulse_joint_set.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dynamics/joint/impulse_joint/impulse_joint_set.rs b/src/dynamics/joint/impulse_joint/impulse_joint_set.rs
index 8f47e0e..093a372 100644
--- a/src/dynamics/joint/impulse_joint/impulse_joint_set.rs
+++ b/src/dynamics/joint/impulse_joint/impulse_joint_set.rs
@@ -244,6 +244,7 @@ impl ImpulseJointSet {
///
/// If `wake_up` is set to `true`, then the bodies attached to this joint will be
/// automatically woken up during the next timestep.
+ #[profiling::function]
pub fn insert(
&mut self,
body1: RigidBodyHandle,
@@ -329,6 +330,7 @@ impl ImpulseJointSet {
///
/// If `wake_up` is set to `true`, then the bodies attached to this joint will be
/// automatically woken up.
+ #[profiling::function]
pub fn remove(&mut self, handle: ImpulseJointHandle, wake_up: bool) -> Option<ImpulseJoint> {
let id = self.joint_ids.remove(handle.0)?;
let endpoints = self.joint_graph.graph.edge_endpoints(id)?;
@@ -356,6 +358,7 @@ impl ImpulseJointSet {
/// The provided rigid-body handle is not required to identify a rigid-body that
/// is still contained by the `bodies` component set.
/// Returns the (now invalid) handles of the removed impulse_joints.
+ #[profiling::function]
pub fn remove_joints_attached_to_rigid_body(
&mut self,
handle: RigidBodyHandle,