How to get visible size of DisplayObject with perspective projection
- by Ain
The following is entirely a math question.
As we know, PerspectiveProjection delivers perspective transformations in 3D represented by the interdependent values of fieldOfView and focalLength according to the following formula:
focalLength = stageWidth/2 * (cos(fieldOfView/2) / sin(fieldOfView/2)
Bjørn Gunnar Staal has prepared a good image to illustrate the situation.
Q: How to get the visible on-screen size of the DisplayObject (Cube on the above-linked image) to which PerspectiveProjection has been applied?