mike-a-bike / yaphyre

Automatically exported from code.google.com/p/yaphyre
0 stars 0 forks source link

Fix focal length calculation for PerspectiveCamera #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The correct algorithm would be:

h = filmheight / focal-length

* Change the current implementation to always keep a distance of 1 unit from 
the eye for the projection plane
* Vary the height of the projection plane to match the focal length
* Calculate the width of the projection plane according to the aspect ratio

Original issue reported on code.google.com by mike0...@gmail.com on 25 Sep 2012 at 10:31