java 3 dimensional rectangle