A sphere of radius r lies inside a cube and touches each of the six sides of the cube. Calculate the volume of the cube in terms of r.