Three collision detection

See my response to another collision detection related question