I'm a newbie in c++ and openGL so keep in mind that my coding skills are not top notch but I'm a quick learner.
So,because my favorite puzzle is the Rubik's Cube,I decided to unleash my creativity so now I'm currently making a 3D Rubik's Cube and I'm representing each cubie piece(26 pieces excluding the core piece) individually using quads.(planning to use textures in the future after I learn how to use them)
Right now I'm able to rotate the camera around using glRotatef and see the whole cube.
The main problem I have stumbled upon is rotating each face by its own and also keeping track of the cubies to determine which faces they now belong to which will also determine if they will be affected if the face rotated.
At this point I have realized that using glRotatef will bring no good in moving forward so I searched around and found out about Quaternions so I have read a bunch of tutorials about them but I have no idea how to implement them and use them.
This is the last tutorial I have been reading:
http://www.cprogramming.com/tutorial/3d/quaternions.html
My request would be a very simple example on how to implement it and use it in my display function.
As for keeping track of the cubies,I'm currently thinking of using 6 booleans for each piece to determine their position through the center pieces.
If you have any other better ideas or concepts on managing face rotations please do tell.
Regards,,