Matrix.perspective

Construct perspective matrix

  1. MatType perspective(int fovy, T aspect, T near, T far)
    struct Matrix(T, size_t H, size_t W)
    static
    static if(!(isSquare && W == 2 && isFloatingPoint!T))
    static if(!(isSquare && W == 3 && isFloatingPoint!T))
    static if(isSquare && W == 4 && isFloatingPoint!T)
    perspective
    (
    int fovy
    ,,,
    T far
    )
    if (
    isNumeric!T &&
    W > 0
    &&
    H > 0
    )
  2. MatType perspective(T fovy, T aspect, T near, T far)

Parameters

fovy int

vertical fov in degrees (int) or radians (double)

aspect T

screen.width / screen.height

near T

near cutoff plane

Meta