Mouse movement to impulse

Can I transform mouse movement into impulse?
I mean I know it could be done, what I am asking is if this functionality is already in the engine or should I write code for it?
Say I pickup a physics object, I want to be able to throw it based on the way I move the mouse before releasing the button.