I am trying to rotate a cube 90 degrees on the Y axis, and then 90 degrees on the Z axis, but when I apply the rotation on the Z axis, it actually changes the angle only on the X axis.
This is my code:
glRotatef(90.0, 0.0, 1.0, 0.0);
glRotatef(90.0,…
I have to solve a problem and I realize it is a bit oldschool code..
I need to write down the order of transformations from 1 to 4 and the result for pruple vertex. Would someone help me check whether it is correct and if not - why?
It is a bit…
I need to access the X,Y values of a vertex object after Ive rotated it (with glRotate3f). How is it possible? I need em to solve an object collision problem where collisions will be sending objects in an angle related direction based upon objects…
I have a problem with writing an alternative function for glRotatef in pure C. I need to implement function which arguments are: list of points, angle and rotate vector. Function must return list of points after rotation. My function looks like…
I want to obtain a mouselook effect.
Omitting mouse coords acquisition and other things, the gist of the problem is that:
using fixed opengl function, this can be made doing
glRotate(angley,0,1,0);
glRotate(anglex,1,0,0);
using my matrix class, the…
I made a methode to rotate a image (most code found in stackoverflow's nice answers). Now I need to cut the image: (1) by the outline and (2) inline the image (no border shown). But I don't know how to do that and I found no sample in all answers…
I am trying to get an object to rotate using opengl and the command gl.glroate but nothing seems to be happening, can anyone show me where i am going wrong ? below is the code
import javax.media.opengl.*;
import javax.media.opengl.glu.GLU;
import…
I am trying to translate an object in world space after rotating it at the origin. The problem is, after I rotate an object while it's at the origin, its local coordinate system rotates as well, so its axes are not parallel with the world coordinate…
I'm trying to make a light source rotate around my character model in my OpenGL project, but as I try it, all I got so far is my model rotating like crazy (or the floor).
My rendering code looks like this:
void mainRender() {
updateState();
…
This has been asked many, many times before and I've read loads of posts and forums on the internet about it, but I just can't get one object to rotate around it's own axis.
I have several objects drawn like this:
…
I'm using pyopengl and glut for this project. I just added a mouse event handler in order to rotate the object. What it does is when the cursor reaches the edge of the window, it rotates. However, when I move the cursor back to the center of the…
Here is my problem. I have to move a torus along a circular trajectory on a bicubic surface.
However the vertical axis of the torus must be aligned with the surface normal at the given point Moreover the torus must face it's circular…
I´m trying to rotate a sprite using drawtexture but nothing happens. I´m using the following code:
gl.glRotatef(90, 0, 0, 1.0f);
gl.glBindTexture(GL10.GL_TEXTURE_2D, TextureID);
(GL11Ext) gl).glDrawTexfOES(x, y, z, width, height);
The texture is…
I am trying to correct the translation and rotation behavior of my model after I rotate the image. This seems to be a common issue. I've seen this asked before, but I have not seen it answered in such a way that I understand how to apply it to my…