PDA

View Full Version : how to render a cuboids in horizontal rotate 90 degree to vertical cuboids



caroline
06-21-2001, 09:57 AM
I am beginner. I am currently having problem with how to render a cuboids in horizontal (at the right of x-axis) and rotate 90 degree to the left, a cuboids will be in vertical (parallel with y-axis). I am using OpenGL with Visual C++. Pls help.

Zeus_666
06-21-2001, 10:20 AM
Hi,
You need to use glTranslate() and glRotate() inorder to move and rotate. I think you need

glRotate3f(_._, _._, _._);
glTranslate3f(-5, _.-, _._);

Hope that helps a bit

caroline
06-22-2001, 01:16 AM
thanks for helping me. but i don't want cuboid to rotate 360-degree. I just want to rotate till 90-degree.
anyway to do it?

omkar26
06-22-2001, 02:05 AM
You should have a look at the arguments of glRotate3f().
I sugeest you should see some examples and get some tutorials, as I did ; I am also a beginner.


Originally posted by caroline:
thanks for helping me. but i don't want cuboid to rotate 360-degree. I just want to rotate till 90-degree.
anyway to do it?