Function perspective

Source
pub fn perspective<T>(
    aspect: T,
    fovy: T,
    near: T,
    far: T,
) -> Matrix<T, Const<4>, Const<4>, ArrayStorage<T, 4, 4>>
where T: RealNumber,
Expand description

Creates a matrix for a right hand perspective-view frustum with a depth range of -1 to 1

§Parameters

  • aspect - Ratio of viewport width to height (width/height)
  • fovy - Field of view, in radians
  • near - Distance from the viewer to the near clipping plane
  • far - Distance from the viewer to the far clipping plane

§Important note

The aspect and fovy argument are interchanged compared to the original GLM API.