Merge branch 'master' into split_geom
# Conflicts: # examples2d/sensor2.rs # examples3d/sensor3.rs # src/dynamics/integration_parameters.rs # src/dynamics/solver/parallel_island_solver.rs # src/dynamics/solver/velocity_constraint.rs # src/dynamics/solver/velocity_ground_constraint.rs # src_testbed/nphysics_backend.rs # src_testbed/physx_backend.rs # src_testbed/testbed.rs
This commit is contained in:
@@ -57,8 +57,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 {
|
||||
|
||||
@@ -251,7 +251,7 @@ impl ParallelIslandSolver {
|
||||
let dvel = mj_lambdas[rb.active_set_offset];
|
||||
rb.linvel += dvel.linear;
|
||||
rb.angvel += rb.effective_world_inv_inertia_sqrt.transform_vector(dvel.angular);
|
||||
rb.integrate(params.dt());
|
||||
rb.integrate(params.dt));
|
||||
positions[rb.active_set_offset] = rb.position;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +144,7 @@ impl VelocityConstraint {
|
||||
out_constraints: &mut Vec<AnyVelocityConstraint>,
|
||||
push: bool,
|
||||
) {
|
||||
let inv_dt = params.inv_dt();
|
||||
let rb1 = &bodies[manifold.data.body_pair.body1];
|
||||
let rb2 = &bodies[manifold.data.body_pair.body2];
|
||||
let mj_lambda1 = rb1.active_set_offset;
|
||||
@@ -244,7 +245,7 @@ impl VelocityConstraint {
|
||||
rhs += manifold_point.restitution * rhs
|
||||
}
|
||||
|
||||
rhs += manifold_point.dist.max(0.0) * params.inv_dt();
|
||||
rhs += manifold_point.dist.max(0.0) * inv_dt;
|
||||
|
||||
let impulse = manifold_point.data.impulse * warmstart_coeff;
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ impl VelocityGroundConstraint {
|
||||
out_constraints: &mut Vec<AnyVelocityConstraint>,
|
||||
push: bool,
|
||||
) {
|
||||
let inv_dt = params.inv_dt();
|
||||
let mut rb1 = &bodies[manifold.data.body_pair.body1];
|
||||
let mut rb2 = &bodies[manifold.data.body_pair.body2];
|
||||
let flipped = !rb2.is_dynamic();
|
||||
@@ -159,7 +160,7 @@ impl VelocityGroundConstraint {
|
||||
rhs += manifold_point.restitution * rhs
|
||||
}
|
||||
|
||||
rhs += manifold_point.dist.max(0.0) * params.inv_dt();
|
||||
rhs += manifold_point.dist.max(0.0) * inv_dt;
|
||||
|
||||
let impulse = manifold_points[k].data.impulse * warmstart_coeff;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user