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
0
votes
1 answer

point - plane collision without the glutLookAt* functions

As I have understood, it is recommended to use glTranslate / glRotate in favour of glutLootAt. I am not going to seek the reasons beyond the obvious HW vs SW computation mode, but just go with the wave. However, this is giving me some headaches as I…
kellogs
  • 2,837
  • 3
  • 38
  • 51
0
votes
1 answer

Rotating and object from left/right and up/down movements

I'm writing a game which involves cubes. The user can rotate individual cubes, from his perspective, 90deg left, right, up or down. Naturally as the shape is rotated, the positions of its axes change, so the next rotation might be about a different…
Mark Smith
  • 880
  • 1
  • 8
  • 25
0
votes
2 answers

OpenGL object not rotating

So, I've been trying to rotate a single object in an OpenGL/GLUT environment. After going through several questions on SO and the like, I've written what appears to be correct code, but no dice. Does anyone know how to make this work? PS: I've…
0
votes
1 answer

Rotation and Translation on Object coordinate

I'm programming a simple application in OpenGL. I have a model that I want to rotate around its center (local coordinate), then translate it along with its local coordinate, too. I've done two scenarios, rotate then translate, and vice versa. In…
jouzef19
  • 63
  • 4
  • 11
0
votes
2 answers

coordinate values after rotation in opengl

Say I have a cube. Say the coordinate values are like this. (1 unit an arm) GLfloat vertA[3] = { 0.5, 0.5, 0.5}; GLfloat vertB[3] = {-0.5, 0.5, 0.5}; GLfloat vertC[3] = {-0.5,-0.5, 0.5}; GLfloat vertD[3] = { 0.5,-0.5, 0.5}; GLfloat vertE[3] = { 0.5,…
hitman047
  • 83
  • 2
  • 2
  • 6
0
votes
1 answer

How to rotate image primitive? I have tried to use glRotatef function, but it does not get result

This code must draw two sinus-lines. Here two usual lines are transformed via shader into sinus-lines. I have a task to rotate one of them(for example, for 45 or 90 degrees), how to do it? void CMyApplication::OnDraw() { …
0
votes
1 answer

OpenGl rotate custom implementation

I'm trying to code my custom implementation of Opengl glRotatef(angle,x,y,z) function. I wrote the rotation matrix, but when I try to use it, the effect is not the same as the original function. Here is my code; void mglRotate(float angle, float x,…
user1071138
  • 656
  • 3
  • 12
  • 30
0
votes
1 answer

Roatating an Object around its (x,y&z) axis contemporaneously in C++ using OpenGL

I want to write a function for rotating an object around its axis contemporaneously with passing the each angle around its x, y and z axis; I read here but I did not understand it completely. for example for rotating around my shape's axis, which…
Golnaz Saraji
  • 154
  • 1
  • 3
  • 14
0
votes
1 answer

glRotatef does not rotate anything

here's the problem: my triangle not rotating! Why? What I've done wrong? Here's the code: main.cpp #include #include #include #include "myobject.h" using namespace std; Vector3f position =…
DanilGholtsman
  • 2,354
  • 4
  • 38
  • 69
0
votes
3 answers

(each call to glTranslate is cumulative on the modelview matrix) what does it mean and how to disable this feature?

Studying the book OpenGL SuperBible fram Addison-Wesley, I read: each call to glTranslate is cumulative on the modelview matrix what does it mean? Does it mean that for example this code: glTranslatef(2.0,3.0,0); glTranslatef(4.0,5.0,0); first…
Sepideh Abadpour
  • 2,550
  • 10
  • 52
  • 88
0
votes
1 answer

Rotate a object in OpenGL

I want to move an objecto in OpenGL. I draw the object in (0,0,0), if the object is on that point it rotates fine (using the center of the object as reference to rotate). The problem comes when I move the object, it rotates using the same point as…
Jack
  • 321
  • 1
  • 2
  • 11
0
votes
1 answer

LWJGL glRotatef using multiple axis

I am trying to rotate something on theoretically the y 90 degrees to show the side, and then 45 degrees on the z to put it at an upwards angle. I do so with: glRotatef(90, 0, 1, 0); glRotatef(45, 0, 0, 1); The problem is that it isnt rotating off…
sandspro
  • 72
  • 1
  • 7
0
votes
2 answers

GL.Rotate and Matrix4.CreateRotationX different ouputs

I tried to rotate some vertices using different ways of rotation - GL.Rotate, Matrix4.CreateRotationX and Matrix4.RotateX. To my surprise they gave different outputs. Here's the function that creates the three matrices and outputs them to the…
-1
votes
2 answers

OpenGl draw a cylinder with 2 points glRotated

I want to show draw a cylinder that starts at point a and that points to I think the key is in the first glRotated, but this is my first time working with openGL a and b are btVector3 glPushMatrix(); glTranslatef(a.x(), a.y(), a.z()); glRotated(0,…
サルバドル
  • 379
  • 1
  • 6
  • 12
1 2
3