The vertical field of view (in radians).
The aspect ratio (width / height) of the viewport.
The distance to the near clipping plane.
The distance to the far clipping plane.
Optional
m: FloatArrayParamAn optional destination matrix to store the result. If not provided, a new matrix is created.
The resulting 4x4 perspective projection matrix. If m
is provided, it will be modified; otherwise, a new matrix is returned.
Returns a 4x4 perspective projection matrix based on the given field of view, aspect ratio, and near/far clipping planes.
This function generates a perspective projection matrix, which transforms 3D coordinates into 2D space. The matrix maps the frustum defined by the near and far planes and the field of view into the canonical view volume.