Original Post
I'm looking for a good algorithm to round the edges of a mesh generated by a function. The mesh will be two or more sides of a cube or wedge, and I want it to round any edges that join two of these sides. At first, I was going to just add extra vertices around the edges, but that won't work because when two edges meet, it wouldn't make a proper rounded corner. Any good algorithm will do, but if you need to know, I'm using Java and LWJGL, and my mesh building algorithm internally stores its faces as six arrays of 4 vertices. Since the algorithm will be inside the mesh building algorithm (activated via a flag) this is the format I need to use, unless it's easier to process an array of floats, which I doubt.