use super::RecordingSession;
use crate::{ExplosionDef, Result};
impl RecordingSession<'_> {
pub fn enable_sleeping(&mut self, flag: bool) -> Result<()> {
crate::world::run_owner_call(self, |world| {
crate::world::world_enable_sleeping(world, flag)
})
}
pub fn enable_continuous(&mut self, flag: bool) -> Result<()> {
crate::world::run_owner_call(self, |world| {
crate::world::world_enable_continuous(world, flag)
})
}
pub fn enable_warm_starting(&mut self, flag: bool) -> Result<()> {
crate::world::run_owner_call(self, |world| {
crate::world::world_enable_warm_starting(world, flag)
})
}
pub fn set_restitution_threshold(&mut self, threshold: f32) -> Result<()> {
crate::world::run_owner_call(self, |world| {
crate::world::world_set_restitution_threshold(world, threshold)
})
}
pub fn set_hit_event_threshold(&mut self, threshold: f32) -> Result<()> {
crate::world::run_owner_call(self, |world| {
crate::world::world_set_hit_event_threshold(world, threshold)
})
}
pub fn explode(&mut self, def: &ExplosionDef) -> Result<()> {
crate::world::run_owner_call(self, |world| crate::world_extras::world_explode(world, def))
}
pub fn set_contact_tuning(
&mut self,
hertz: f32,
damping_ratio: f32,
push_speed: f32,
) -> Result<()> {
crate::world::run_owner_call(self, |world| {
crate::world::world_set_contact_tuning(world, hertz, damping_ratio, push_speed)
})
}
pub fn set_contact_recycle_distance(&mut self, distance: f32) -> Result<()> {
crate::world::run_owner_call(self, |world| {
crate::world::world_set_contact_recycle_distance(world, distance)
})
}
pub fn set_maximum_linear_speed(&mut self, speed: f32) -> Result<()> {
crate::world::run_owner_call(self, |world| {
crate::world::world_set_maximum_linear_speed(world, speed)
})
}
}