Turning Quadtrees into Triangle Strips
So far, all of the terrain expansion has been done in terms of quadtrees, which are fundamentally built around squares. 3D graphics engines typically work best with strips of triangles, however. The graphics engine must do involved trigonometry to compute the screen coordinates of each vertex, so we want to avoid recomputing the coordinates of the same vertex multiple times.
I have only worked with these functions in OpenGL, which has two approaches to this problem: triangle strips and vertex lists. I am going to assume that the TEP engine also allows vertex lists. Then the triangle strips will be defined as sequences of integers, which are indices into the vertex list, an array of vertex (x, y, z) coordinates.
Home | Terrain Generation