Added helper methods for collision computation and vector manipulations.