Opengl gluLookAt function need nine parameters, of which the first three eye position is set to point E, middle three for target location is set to point A, so reverse view vector for A - E; The last three parameters for the up vector, namely the head in the direction; As far as I am understand head up and gaze direction vertical direction, so the vector (A - E) up and vector inner product should be 0, but his conclusion on https://blog.csdn.net/yangzhiloveyou/article/details/20299759 is vertical (A -) of the up and up, and http://www.it1352.com/501532.html said the up direction and the line of sight direction does not need to be vertical, don't understand is what set itself up vertical direction and the line of sight direction do you want, if they have set perpendicular to the OpenGL program is automatically to the parameter changes,
CodePudding user response:
The document, should be don't need to be vertical, didn't mention the vertical,
CodePudding user response:
Vertical is not opengl code will automatically adjust the UP vector value, the line of sight and the UP vector theory must be vertical