Function nanogui::unproject

Function Documentation

Vector3f nanogui::unproject(const Vector3f &win, const Matrix4f &model, const Matrix4f &proj, const Vector2i &viewportSize)

Unprojects the vector win out of the specified viewport.

The reverse transformation of project use the same matrices and viewport dimensions to easily transition between the two spaces.

Parameters
  • win: The vector being transformed out of “screen space”.

  • model: The model matrix.

  • proj: The projection matrix.

  • viewportSize: The dimensions of the viewport to project out of.