Modify geometry to return indices.

This way you can use the indices or extract them
using vertices[indices].