Projection Matrix Help

Started by
0 comments, last by Fase 15 years, 5 months ago
Hi guys, For the last week or so I have been trying to create a projection matrix without success, I have read through numerous gamedev articles related to projection matrices but for one reason or another they have failed to provide a solution. I am posting this question here as a last resort and I really hope you guys are able to help me with this. This is the environment I am working in:
viewWidth   = 640
viewHeight  = 360
fieldOfView = 80
focalLength = 381
The coordinate system is a bit odd due to the fact I am working with ActionScript 3.0 here:
positive X = left to right
positive Y = top to bottom
positive Z = into the view (away from the screen)
The matrices I am working with are 4x4 and are row-based and stored as a single array. The upper-case character represents the vector, the lower-case character represents the component:
matrix[ Xx, Xy, Xz, Xw, Yx, Yy, Yz, Yw, Zx, Zy, Zz, Zw, Wx, Wy, Wz, Ww ]
Finally, I am working with euler angles. If anyone can show me (in Layman's terms) how to generate a projection matrix I would be extremely grateful. Thanks.
Advertisement
Hi,

Maybe the internals of GluPerspective is what you're looking for:
link
Although I'm not sure how to translate focal length to zNear and zFar.

Look at all the pretty colours!

This topic is closed to new replies.

Advertisement