Fast and accurate collision detection for haptic interaction using a three degree-of-freedom force-feedback device