Arrays help

I have some data in a multidimensional array that represents sets of 3d coordinates that are the eight vertices of a 5x5x5 cube, so;

const byte vertices[8][3]{

I need to be able to "move" a pointer to each vertex by a variety of different routes...I wanted to hold the order of the vertices in ANOTHER array as follows

const byte order[2][8]{

How do I use the values in the "order" array within the parameters of the "vertices" array to call the values in the required order? Is the array idea the best way, or is there a better one?


Array is fine. What you can do is:

unsigned order_idx=0; // define which vertex order you want to use
for(unsigned i=0; i<8; ++i)
  const byte *vtx=vertices[order[order_idx][i]];
  // use vtx[0], vtx[1], vtx[2] here for the coordinates and do something with them