-1

I have a point which is the initial position of my light :

GLfloat light0Pos[4] = {0.8, 0.8, 0.0, 0.00};

I would like update coordinates of this point when I do a rotation around axis Y of value roty and a rotation around axis X of value rotx.

artoon
  • 729
  • 2
  • 14
  • 41

1 Answers1

1

I have a hard time understanding exactly what you are trying to achieve. You can do a rotation of an object, rotation of the camera or both. Lights usually contain a position and a vector for their direction. In a scene the light position doesn't need to be rotated.

Rotating objects in a scene

Rotating the camera around a point

If you do want to edit the position or vector for the light just edit the values in the array {0.8, 0.8, 0.0, 0.00}

Community
  • 1
  • 1
jazakari
  • 66
  • 1
  • 9
  • "usually", Spot Light & Directional Lights uses a direction vector, though Point Lights doesn't use any direction vector. – vallentin Nov 27 '13 at 14:58
  • I just want edit the position of the light. So I must use trigonometric formula ? – artoon Nov 27 '13 at 15:02