fix polygon and rect collision and vertex functions, add ioSimpleRect