0

I would like to translate along the current modelview direction vector. How do I do that?

daemondave
  • 309
  • 2
  • 12
  • You should be a little more clear about what you're asking. What are your trying to do? – Lee Jacobs Mar 09 '15 at 07:20
  • extract the vector from matrix and then just translate ... see http://stackoverflow.com/a/25216549/2521214 of coarse your modelview have to hold what you thing it should (if also camera is multiplied to it then you're screwed unless you want to change view ... and need another approach) ... use `GLdouble m[16]; glGetDoublev(GL_MODELVIEW_MATRIX,m);` to obtain the matrix data – Spektre Mar 09 '15 at 10:10

1 Answers1

0

You don't. The modelview transformation is represented by a matrix and will map any vector you put into it into a corresponding transformed vector; and unless the matrix is singular the transformation will be bijective.

datenwolf
  • 159,371
  • 13
  • 185
  • 298