Cuboid shape implementation.