0
\$\begingroup\$

enter image description hereHow calculate camera target position, if I have front/back planes, camera transformation matrix and camera lens length?

\$\endgroup\$
2
  • \$\begingroup\$ I mean a point of camera target (x,y,z). Look on the picture. \$\endgroup\$ Jun 16, 2016 at 21:33
  • \$\begingroup\$ What do you mean by "target position"? Intersection of forward vector with far plane? \$\endgroup\$
    – wondra
    Jun 16, 2016 at 21:48

1 Answer 1

1
\$\begingroup\$

You can't.

This is assuming that you have used the following function

void gluLookAt(GLdouble eyeX,
  GLdouble eyeY,
  GLdouble eyeZ,
  GLdouble centerX,
  GLdouble centerY,
  GLdouble centerZ,
  GLdouble upX,
  GLdouble upY,
  GLdouble upZ);

to get your transformation matrix, and that you want to find what values were used for center parameters.

The lookat method will give you a matrix that is good to transform the camera position, but will use 'clean' values for it: it will at least normalize the center-eye vector.

If you want to keep track of what is the 'center' of the camera, keep it in a variable, and use that variable instead.

(Doc)

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .