Documentation comment for three functions: topVertexPosition, bottomVertexPosition, vertexPosition. There is an ASCII art embedded in it that could be described as a three level square tower.
Gets position of a vertex in any of the loops of the tile.
Use [topVertexPosition] to retrieve vertices of the first (top) loop, [bottomVertexPosition] for vertices of the last (bottom) loop, or [vertexPosition] to receive either or a loop in between.
Each loop is indexed. Loop 0 is the top loop, subsequent loops are wall repeat (see [wallRepeatCount]), and the last loop is the bottom loop. Consequently, there are `wallRepeatCount + 2` loops in the tile. For example, a tile with 2 wall repeat loops will have 4 repeats total:
(Illustration goes here. It shows the tile divided into three segments. Four labels next to the illustration name each of the loops: loop 0 is the top, loops 1 and 2 are wall repeats, and loop 3 is the bottom)
Returns:
Local 3D position for given vertex index at the top ([altitude] level) or bottom (altitude minus [depth]) of the mesh, or a texture repeat loop ([wallRepeat] level or a multiple). Includes relevant `position` offset.
Params:
i = Vertex index belonging to the tile.
loop = Index of the loop to get a vertex from.
topVertexPosition and bottomVertexPosition take one argument each, "i", and vertexPosition takes two: "i" and "loop"
hell yeah, writing docs
#programming #dlang