what are the parameters of glRotatef?
can someone tell me what the parameters of glRotatef are?
thx
"Those who serve no purpose, have no purpose"
void glRotatef( GLfloat angle,
GLfloat x,
GLfloat y,
GLfloat z )
Look at this website: The OpenGL WWW Pages
Also, this post was probably unnecessary since you could have found it using any search engine.
Also, you generally don't wanna double-post in GameDev.net; it's not proper "etiquette."
If you are in search of a good search engine go to Google
EDIT: I dislike how if you don't put http:// before the line on anchors the browser thinks that you want to go to a subdirectory of the page your looking at.
Edited by - Floppy on November 16, 2001 7:13:27 PM
GLfloat x,
GLfloat y,
GLfloat z )
Look at this website: The OpenGL WWW Pages
Also, this post was probably unnecessary since you could have found it using any search engine.
Also, you generally don't wanna double-post in GameDev.net; it's not proper "etiquette."
If you are in search of a good search engine go to Google
EDIT: I dislike how if you don't put http:// before the line on anchors the browser thinks that you want to go to a subdirectory of the page your looking at.
Edited by - Floppy on November 16, 2001 7:13:27 PM
i didnt mean to double post...
i dont understand the first parameter and how it works with the others, could u possibly elaborate further?
"Those who serve no purpose, have no purpose"
i dont understand the first parameter and how it works with the others, could u possibly elaborate further?
"Those who serve no purpose, have no purpose"
x,y,z describe the vector axis that the rotation angle is supposed to rotate around. the angle is the amount.
The angle is how much you want to rotate by. Then you want to tell it which axis to rotate on by puting a 1.0 in that field and having the others as 0.0.
So: glRotatef(1.0, 0.0, 1.0, 0.0) tells it to rotate one unit on the y axis.
To have the object to keep spinning, you would put a variable there and increment the
variable in a loop like so
float Angle = 0.0;
glRotatef(Angle, 1.0, 0.0, 0.0);
Angle += 1.0f
if(Angle == 360.0);
Angle = 0;
This would have the object keep rotating on the x axis
hope thats what you wanted
So: glRotatef(1.0, 0.0, 1.0, 0.0) tells it to rotate one unit on the y axis.
To have the object to keep spinning, you would put a variable there and increment the
variable in a loop like so
float Angle = 0.0;
glRotatef(Angle, 1.0, 0.0, 0.0);
Angle += 1.0f
if(Angle == 360.0);
Angle = 0;
This would have the object keep rotating on the x axis
hope thats what you wanted
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement