I've read the documentation here: http://www.opengl.org/sdk/docs/man2/xhtml/glRotate.xml
It specifies that angle is in degrees. It says that X,Y,Z are vectors. If I say glRotate(2,1,0,0) that says I will rotate 2 degrees about the X axis.
What…
I have a 3D Model (OpenGL ES 1.1 iPhone SDK v3.0) that is somewhat complex (i.e. Thousands of Vertexes and Faces) and I'd like to rotate this model around the Y-axis at or near the center of the Model. The problem is that glRotate rotates my model…
What is the difference between
glRotatef(angle, 1.0f, 0.0f, 0.0f);
glRotatef(angle, 0.0f, 0.0f, 1.0f);
and
glRotatef(angle, 1.0f, 0.0f, 1.0f);
And why nothing change when I change the second paramater 1.0f to 5.0f?
Lastly, how can I rotate an…
I am trying to rotate only one square but it did not work it rotates all of them
in this code when I click N it creates a new square and pushes it in the array I want when I click R to
rotates specific square not all of them
when I search on google…
In the following program i am trying to draw a simple house. The coordinates are defined in the house array. I need to rotate the house and display both rotated as well as the original house.
But why is the rotated house not being displayed?
…
I need a function that applies a translation like glTranslate() to a point.
Does someone know of a function like glTranslate() and glRotate() to modify and retrieve a matrix to multiply?
I have some 3D models that I render in OpenGL in a 3D space, and I'm experiencing some headaches in moving the 'character' (that is the camera) with rotations and translation inside this world.
I receive the input (ie the coordinates where to…
I'm Using OpenGL/C++ to create a game.
One aspect of this game that I'm working on is having a character that shoots a projectile the way said character is facing. To do this I have a 'player' and a 'projectile'.
I pass to the projectile the…
The program rotates a point using the glRotatef function, how can I calculate the coordinates of the point after the rotation, or is there a function in PyOpenGL to do this?
def drawPoint():
glBegin(GL_POINTS)
glVertex(1,0,0)
glEnd()
def…
I have created a that moves the square around using arrow keys. Now I want my square turn 90 degrees on y axis everytime I press 'r' key. I have already added case statements for arrow keys that allows my square to move around.
here is my…
I'm about to make a rotating sphere in C++ OpenGL, MFC Application.
so I declared a variable that has a spinning velocity in demo.h :
GLfloat angle;
void Init();
Also, I initialized that variable and implemented one normal sphere at xyz(0,0,0) in …
I'm making a fan in OpenGL, and I have in it the pole and the things that rotate, when I try to rotate them, all the fan rotate with the pole, how im supposed to fix it, I used glutPostRedisplay(), also when I use push and pup matrix in rotation, it…
(iPhone) I'm trying to make it so that the user can rotate an object by dragging his finger on the screen. Dragging left or right should rotate around the Y-axis, and dragging up or down should rotate around the X-axis. Here's my original…
I have the function glRotatef with these parameters.
glRotatef(-119.718,-0.58064,-0.575698,-0.575699);
If I do this...
glRotatef(-119.718,-0.58064,0.0,0.0);
glRotatef(-119.718,0.0,-0.575698,0.0);
glRotatef(-119.718,0.0,0.0,-0.575699);
I do not get…
I'm trying to rotate the image of a player to where they are pointing. Technically, this works fine. It rotates the image along the Z axis after transforming to the center, and then transforms back, no problem.
However, when this is rendered, as the…