I update my question asked yesterday,and hope someone to clarify this question !
When applying pitch-yaw-roll(assume we choose this order) angles to implement a air camera,I think we can compute the view matrix like this :
And there are sites support this viewpoint such as Using a camera and simple user input and OpenGL Transformation,their code style like this :
// First, transform the camera (viewing matrix) from world space to eye space
// Notice all values are negated, because we move the whole scene with the
// inverse of camera transform
glRotatef(-roll, 0, 0, 1); // roll
glRotatef(-yaw, 0, 1, 0); //yaw
glRotatef(-pitch, 1, 0, 0); // pitch
glTranslatef(-cameraPosition[0], -cameraPosition[1], -cameraPosition[2]);
I do believe this is right.
while Red book pilotView(7th edition), A C++ Camera Class for Simple OpenGL FPS Controls , First Person Camera Control with LWJGL, Modern OpenGL 04 - Cameras, Vectors & Input code like this style :
glRotatef(roll, 0, 0, 1); // roll
glRotatef(yaw, 0, 1, 0); //yaw
glRotatef(pitch, 1, 0, 0); // pitch
glTranslatef(-cameraPosition[0], -cameraPosition[1], -cameraPosition[2]);
It will work,and not influence much on user interaction,But from math's viewpoint ,it is not that right.
Why books and others choose the second code style? Please Help clarify this question !