Optimized Spatial Hashing for Collision Detection of Deformable