GlmSharp/GlmSharpCompat5/Mat4x4/decmat4.cs
/// <summary>
/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.
/// </summary>
Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.
Creates a matrix for a symmetric perspective - view frustum with far plane at infinite .
public static decmat4 InfinitePerspective(decimal fovy, decimal aspect, decimal zNear)
        {
            var range = Math.Tan((double)fovy / 2.0) * (double)zNear;
            var l = -range * (double)aspect;
            var r = range * (double)aspect;
            var b = -range;
            var t = range;
            var m = Identity;
            m.m00 = (decimal)( ((2.0)*(double)zNear)/(r - l) );
            m.m11 = (decimal)( ((2.0)*(double)zNear)/(t - b) );
            m.m22 = (decimal)( - (1.0) );
            m.m23 = (decimal)( - (1.0) );
            m.m32 = (decimal)( - (2.0)*(double)zNear );
            return m;
        }
public static decmat4 InfinitePerspective ( decimal fovy , decimal aspect , decimal zNear ) { var range = Math . Tan ( ( double ) fovy / 2.0 ) * ( double ) zNear ; var l = - range * ( double ) aspect ; var r = range * ( double ) aspect ; var b = - range ; var t = range ; var m = Identity ; m . m00 = ( decimal ) ( ( ( 2.0 ) * ( double ) zNear ) / ( r - l ) ) ; m . m11 = ( decimal ) ( ( ( 2.0 ) * ( double ) zNear ) / ( t - b ) ) ; m . m22 = ( decimal ) ( - ( 1.0 ) ) ; m . m23 = ( decimal ) ( - ( 1.0 ) ) ; m . m32 = ( decimal ) ( - ( 2.0 ) * ( double ) zNear ) ; return m ; }
Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.
Creates a matrix for a symmetric perspective - view frustum with far plane at infinite .
fovy
decimal
aspect
decimal
zNear
decimal