The derivation of Dragon Book 9 Chapter12 Viewmatrix and the realization of camera's basic ability

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.