3D Physics Engine with rigid body collision detector and resolver