I have problem understanding the mechanism of glrotatef or how does it work, after doing some research I found out that it consists it takes 4 variables, which are the angle that I use to rotate, 1 or 0 for x axis, 1 or 0 for y axis, and 1 or 0 for z axis.
answering of the following questions will help me understanding the glrotatef
the questions are
Before reading the answers of question, I suggest you to read how translate/rotate/scale is done with model matrix
When you need to transform your object, you simply perform operation for each vertex that your object has.
P = [x,y,z,1] -- your point in 3D
M = [..] -- your 4x4 rotation matrix
M * P -- your rotation operation
In the light of references I provide, here are the very simplified answers :
M1 = your 60 degree rotation matrix
M2 = your 30 degree rotation matrix
M1 = M2 * M2 => M1 * P = M2 * M2 * P
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.