IntegrationParameters: deprectate dt() and inv_dt() methods
This commit is contained in:
@@ -139,6 +139,7 @@ impl IntegrationParameters {
|
||||
|
||||
/// The current time-stepping length.
|
||||
#[inline(always)]
|
||||
#[deprecated = "You can just read the `IntegrationParams::dt` value directly"]
|
||||
pub fn dt(&self) -> f32 {
|
||||
self.dt
|
||||
}
|
||||
@@ -157,6 +158,7 @@ impl IntegrationParameters {
|
||||
|
||||
/// Sets the time-stepping length.
|
||||
#[inline]
|
||||
#[deprecated = "You can just set the `IntegrationParams::dt` value directly"]
|
||||
pub fn set_dt(&mut self, dt: f32) {
|
||||
assert!(dt >= 0.0, "The time-stepping length cannot be negative.");
|
||||
self.dt = dt;
|
||||
|
||||
@@ -59,8 +59,7 @@ impl IslandSolver {
|
||||
}
|
||||
|
||||
counters.solver.velocity_update_time.resume();
|
||||
bodies
|
||||
.foreach_active_island_body_mut_internal(island_id, |_, rb| rb.integrate(params.dt()));
|
||||
bodies.foreach_active_island_body_mut_internal(island_id, |_, rb| rb.integrate(params.dt));
|
||||
counters.solver.velocity_update_time.pause();
|
||||
|
||||
if manifold_indices.len() != 0 || joint_indices.len() != 0 {
|
||||
|
||||
@@ -234,7 +234,7 @@ impl ParallelIslandSolver {
|
||||
let dvel = mj_lambdas[rb.active_set_offset];
|
||||
rb.linvel += dvel.linear;
|
||||
rb.angvel += rb.world_inv_inertia_sqrt.transform_vector(dvel.angular);
|
||||
rb.integrate(params.dt());
|
||||
rb.integrate(params.dt);
|
||||
positions[rb.active_set_offset] = rb.position;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user