Camera.projection

Camera.projection(width, height)[source]

Compute the projection matrix corresponding to the current camera settings.

Parameters:
  • width (float) – Width of the viewer.

  • height (float) – Height of the viewer.

Returns:

4x4 np.array – The transformation matrix as a numpy array in column-major order.

Notes

The projection matrix transforms the scene from camera coordinates to screen coordinates.