This chapter is mainly about deriving Viewmatrix and designing a basic camera function.
Note I. Derivation of Viewmatrix
Key statement:
1. How objects in the world coordinate system are described in the camera coordinate system, equivalent to the object in the world coordinate system with the camera transformation, so that the camera and the world coordinate system coincident.
2. Inverse and transpose equivalence of standard orthogonal matrices
Known parameters: Camera position, three orientation vectors
Derivation process: 1. Pan to Origin 2 for rotation transformation
There is a matrix that is not deduced, that is, the point P rotates around any axis matrix ....
Note two:
function implementation of the camera class: 1. Initialize, determine cameratype, land type or any Airtype
2.getViewMatrix, based on camera's position right-up look get Viewmatrix
3. Six modes of operation: Front and back, left and right, up and down, right rotation, up rotation, look rotation
The change of 4.camera is based on the time Timedelta, so that it does not depend on the frame rate to maintain stable change speed.
The derivation of Dragon Book 9 Chapter12 Viewmatrix and the realization of camera's basic ability