pub fn writeback_impulses(&self, manifolds_all: &mut [&mut ContactManifold]) {
        let manifold = &mut manifolds_all[self.manifold_id];

        for k in 0..self.num_contacts as usize {
            let contact_id = self.manifold_contact_id[k];
            let active_contact = &mut manifold.points[contact_id as usize];
            active_contact.data.impulse = self.elements[k].normal_part.impulse;
            active_contact.data.rhs = self.elements[k].normal_part.rhs;

            #[cfg(feature = "dim2")]
            {
                active_contact.data.tangent_impulse = self.elements[k].tangent_part.impulse[0];
            }
            #[cfg(feature = "dim3")]
            {
                active_contact.data.tangent_impulse = self
                    .tangent_rot1
                    .inverse_transform_vector(&self.elements[k].tangent_part.impulse);
            }
        }
    }
// FIXME: duplicated code. This is exactly the same as in the non-ground velocity constraint.
duplicated code. This is exactly the same as in the non-ground velocity constraint.
duplicated code . This is exactly the same as in the non - ground velocity constraint .
pub fn writeback_impulses(&self, manifolds_all: &mut [&mut ContactManifold]) {
        let manifold = &mut manifolds_all[self.manifold_id];
        for k in 0..self.num_contacts as usize {
            let contact_id = self.manifold_contact_id[k];
            let active_contact = &mut manifold.points[contact_id as usize];
            active_contact.data.impulse = self.elements[k].normal_part.impulse;
            active_contact.data.rhs = self.elements[k].normal_part.rhs;
            #[cfg(feature = "dim2")]
            {
                active_contact.data.tangent_impulse = self.elements[k].tangent_part.impulse[0];
            }
            #[cfg(feature = "dim3")]
            {
                active_contact.data.tangent_impulse = self
                    .tangent_rot1
                    .inverse_transform_vector(&self.elements[k].tangent_part.impulse);
            }
        }
    }
pub fn writeback_impulses ( & self , manifolds_all : & mut [ & mut ContactManifold ] ) { let manifold = & mut manifolds_all [ self . manifold_id ] ; for k in 0 .. self . num_contacts as usize { let contact_id = self . manifold_contact_id [ k ] ; let active_contact = & mut manifold . points [ contact_id as usize ] ; active_contact . data . impulse = self . elements [ k ] . normal_part . impulse ; active_contact . data . rhs = self . elements [ k ] . normal_part . rhs ; # [ cfg ( feature " " ) ] { active_contact . data . tangent_impulse = self . elements [ k ] . tangent_part . impulse [ 0 ] ; } # [ cfg ( feature " " ) ] { active_contact . data . tangent_impulse = self . tangent_rot1 . inverse_transform_vector ( & self . elements [ k ] . tangent_part . impulse ) ; } } }
FIXME: duplicated code.
FIXME : duplicated code .
&self
manifolds_all
&mut [&mut ContactManifold]