pub fn writeback_impulses(&self, joints_all: &mut [JointGraphEdge]) {
        let joint = &mut joints_all[self.joint_id].weight;
        if let JointParams::BallJoint(ball) = &mut joint.params {
            ball.impulse = self.impulse;
            ball.motor_impulse = self.motor_impulse;
        }
    }
// FIXME: duplicated code with the non-ground constraint.
duplicated code with the non-ground constraint.
duplicated code with the non - ground constraint .
pub fn writeback_impulses(&self, joints_all: &mut [JointGraphEdge]) {
        let joint = &mut joints_all[self.joint_id].weight;
        if let JointParams::BallJoint(ball) = &mut joint.params {
            ball.impulse = self.impulse;
            ball.motor_impulse = self.motor_impulse;
        }
    }
pub fn writeback_impulses ( & self , joints_all : & mut [ JointGraphEdge ] ) { let joint = & mut joints_all [ self . joint_id ] . weight ; if let JointParams :: BallJoint ( ball ) = & mut joint . params { ball . impulse = self . impulse ; ball . motor_impulse = self . motor_impulse ; } }
FIXME: duplicated code with the non-ground constraint.
FIXME : duplicated code with the non - ground constraint .
&self
joints_all
&mut [JointGraphEdge]