Function project

project(p, model, proj, view) transforms the specified 3D object coordinates $p$ into 2D window coordinates $q$.

  • Parameters

    • p: Vec3

      3D object coordinates (x,y,z)

    • model: Num[][]

      4x4 modelview matrix

    • proj: Num[][]

      4x4 projection matrix

    • view: Vec4

      viewport (x, y, width, height)

    Returns Vec2

    Projected 2D coordinates