Use references for all function arguments in class CollisionDetection now.