I have a voxel raytracer that outputs an XYZ coordinate normalized to the 0-2 area. Whichever coordinate is 0 or 2 is the face that was hit, and the other two are the texture coordinate. The problem arises when I want to rotate the cube faces.
These are only ever 90 degree turns about the 3 orthogonal axis, so this is more of a texture/coordinate shuffling than a traditional rotation, and there are only 24 possible rotations to choose from so I could just create some lookup table and just label every rotation with some arbitrary quantifier and grab the coordinates to use + the face to draw for a given face, but this is arduous to create, and slow.
Does there exist a simpler method/more readable than an arbitrary lookup table, or at least a good qualifier?