0

Is there a way to get the current location of a GLUquadricObj object? I've tried things like obj->getX() and such. Does anyone know how to do this?

genpfault
  • 51,148
  • 11
  • 85
  • 139
segFault42
  • 17
  • 5

1 Answers1

1

Is there a way to get the current location of a GLUquadricObj object?

No. Because there are no GLU objects in a "scene". OpenGL is not a scene graph; there are no models in OpenGL. OpenGL draws things, namely points, lines and triangles. After something has been drawn the only thing that stays are the pixels in the framebuffer.

datenwolf
  • 159,371
  • 13
  • 185
  • 298
  • is there a way to save the current position that an object is going to be drawn to right before it's drawn after the transforms and rotates? – segFault42 Mar 12 '15 at 22:24
  • @segFault42: You can transform the vector `(0,0,0,1)` by the transformation set at the moment of drawing. See https://www.opengl.org/wiki/Vertex_Transformation and https://www.opengl.org/wiki/Viewing_and_Transformations – datenwolf Mar 13 '15 at 01:34
  • @segFault42 Transform feedback is probably the closest to what you're looking for. – Reto Koradi Mar 13 '15 at 04:45