picogl.backend.legacy.core.camera.unproject

Unproject

Functions

unproject(→ Optional[Tuple[float, float, float]])

unproject

Module Contents

picogl.backend.legacy.core.camera.unproject.unproject(x: int, y: int) Tuple[float, float, float] | None[source]

unproject

Parameters:
  • x – x coordinate

  • y – y coordinate

Returns:

Tuple[int, int, int] coordinate_data_main

Un-projects screen coordinate_data_main (x, y) into 3D world coordinate_data_main. Assumes OpenGL context is current -Ensure OpenGL context is current if needed i.e. self.makeCurrent() ← must be called before this if in Qt widget