GlmSharp/GlmSharpCompat5/Mat4x4/decmat4.cs
/// <summary>
/// Creates a frustrum projection matrix.
/// </summary>
Creates a frustrum projection matrix.
Creates a frustrum projection matrix .
public static decmat4 Frustum(decimal left, decimal right, decimal bottom, decimal top, decimal nearVal, decimal farVal)
        {
            var m = Identity;
            m.m00 = (2 * nearVal) / (right - left);
            m.m11 = (2 * nearVal) / (top - bottom);
            m.m20 = (right + left) / (right - left);
            m.m21 = (top + bottom) / (top - bottom);
            m.m22 = -(farVal + nearVal) / (farVal - nearVal);
            m.m23 = -1;
            m.m32 = -(2 * farVal * nearVal) / (farVal - nearVal);
            return m;
        }
public static decmat4 Frustum ( decimal left , decimal right , decimal bottom , decimal top , decimal nearVal , decimal farVal ) { var m = Identity ; m . m00 = ( 2 * nearVal ) / ( right - left ) ; m . m11 = ( 2 * nearVal ) / ( top - bottom ) ; m . m20 = ( right + left ) / ( right - left ) ; m . m21 = ( top + bottom ) / ( top - bottom ) ; m . m22 = - ( farVal + nearVal ) / ( farVal - nearVal ) ; m . m23 = - 1 ; m . m32 = - ( 2 * farVal * nearVal ) / ( farVal - nearVal ) ; return m ; }
Creates a frustrum projection matrix.
Creates a frustrum projection matrix .
left
decimal
right
decimal
bottom
decimal
top
decimal
nearVal
decimal
farVal
decimal