[source lang="csharp"] public static Matrix3D ProjectionMatrix(double angle, double aspect, double near, double far) { double size = near * Math.Tan(MathUtils.DegreeToRadian(angle) / 2.0); double left = -size, right = size, bottom = -size / aspect, top = size / aspect; Matrix3D m = new Matrix3D(new double[,] { {2*near/(right-left),0,(right + left)/(right - left),0}, {0,2*near/(top-bottom),(top+bottom)/(top-bottom),0}, {0,0,-(far+near)/(far-near),-(2 * far * near) / (far - near)}, {0,0,-1,0} }); return m; }[/source]is there anything wrong here?
and the last question how do I use the camera matrix?
Edited by Belos, 20 June 2012 - 11:17 AM.






