Greedy Meshing Orientation

Hello, This a bit of a silly problem, But i really am stuck.

So, Ive been implementing greedy meshing into my game. I have come up with some code that takes a 2D array of voxel heights for terrain, And makes a quad going from that height (The side of the terrain), To the ground (Or to the height of the voxel height to the back of the quad). This code works great! The only problem, Is that the code is only written to iterate through the array of heights one way, So it only adds quads for one side of the terrain.

Ive considered rotating the array, And then some how rotating the result back (The method returns the top left corner of the quad, And the bottom right).

Any ideas on this? If you are interested, Here is my code: http://pastebin.java-gaming.org/70e2b179d1510

Thanks.