Questions tagged [glrotate]

OpenGL function that produces a rotation of angle degrees around the vector x y z .

References

Man Page for glRotate

44 questions
1
vote
1 answer

glRotatef() - How to apply rotation in multiple axis?

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,…
SomethingSomething
  • 11,491
  • 17
  • 68
  • 126
1
vote
1 answer

old JOGL, order of transformation

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…
1
vote
3 answers

Getting values of an object after a call to rotatef c++

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…
d0pe
  • 573
  • 4
  • 9
  • 23
1
vote
2 answers

glRotatef in pure C

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…
devPash
  • 57
  • 5
1
vote
1 answer

glRotate and my matrix::rotate

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…
freesoft
  • 57
  • 7
1
vote
0 answers

Java2D: get coordinates from rotated image

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…
1
vote
1 answer

rotating an object using gl.glrotatef

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…
1
vote
2 answers

OpenGL - Translate after rotate

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…
Drake
  • 2,679
  • 4
  • 45
  • 88
1
vote
1 answer

How to rotate a lightsource around a fixed object (OpenGL)?

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(); …
GennSev
  • 1,586
  • 4
  • 20
  • 29
1
vote
3 answers

OpenGL triangle rotation using glut - need a simple correction

Here is my code : #include #include "glut.h" float width = 800.0; float height = 600.0; void changeSize(int w,int h){ if(h==0) h=1; width = w; height = h; GLdouble ratio = 1.0f*w/h; …
showbiz
  • 198
  • 3
  • 14
0
votes
2 answers

Push/Pop matrix and individual object rotation around its own axis in OpenGL

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: …
Peter
  • 11
  • 1
  • 3
0
votes
1 answer

glRotate() keeps zooming in and out my view without me doing anything

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…
Hung Do
  • 63
  • 1
  • 9
0
votes
1 answer

Multiple rotation problems

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…
Jonathan
  • 1
  • 2
0
votes
2 answers

Problems rotating a sprite using drawtexture (OpenGl ES Android)

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…
Zelleriation
  • 2,834
  • 1
  • 23
  • 23
0
votes
1 answer

After rotating image the translation vector is skewed

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…
twegner
  • 443
  • 1
  • 5
  • 21