Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在理论上将 y 旋转 90 度以显示侧面,然后在 z 上旋转 45 度以使其向上倾斜。我这样做:
glRotatef(90, 0, 1, 0); glRotatef(45, 0, 0, 1);
问题是它不是从原始轴旋转,而是根据最后一个位置旋转。我想知道如何同时旋转轴或达到它从原始旋转的效果。我不确定我是否说得足够清楚,所以请告诉我。
不确定这是否是您的意思,但您当然可以使用:
glRotatef(45, 0, 2, 1);
甚至:
glRotatef(1, 0 ,90, 45);