Let's say I have 8 positions representing the vertices of a polyhedron:
(0, 0, 0), (1, 0, 0), (1, 0, 1), (0, 0, 1),
(0, 1, 0), (1, 1, 0), (1, 1, 1), (0, 1, 1),
How to efficiently generate a list of pairs of indices representing the edges of this mesh?
[
(0, 1), (1, 2), ...
]
The main goal is to draw the mesh with OpenGL using the GL_LINES
primitive.