picogl.backend.glu.lookat ========================= .. py:module:: picogl.backend.glu.lookat .. autoapi-nested-parse:: Provides functionality for representing spatial coordinates and a camera view in 3D space. This module defines utility functions and protocols for transforming spatial data into (x, y, z) tuples, as well as for setting up a camera view using OpenGL's gluLookAt function. It includes support for Coordinates objects, 3-element sequences, and other objects with x, y, and z attributes. Classes ------- .. autoapisummary:: picogl.backend.glu.lookat.SupportsXYZ Functions --------- .. autoapisummary:: picogl.backend.glu.lookat._to_xyz picogl.backend.glu.lookat.glu_look_at picogl.backend.glu.lookat.glu_look_at_coords Module Contents --------------- .. py:class:: SupportsXYZ Bases: :py:obj:`Protocol` Supports XYZ .. py:attribute:: x :type: float .. py:attribute:: y :type: float .. py:attribute:: z :type: float .. py:function:: _to_xyz(v: molib.pdb.coordinate.coordinate.Coordinate3D | collections.abc.Sequence[float] | Any) -> tuple[float, float, float] Return *v* as an ``(x, y, z)`` tuple. .. py:function:: glu_look_at(eye_x: float, eye_y: float, eye_z: float, center_x: float, center_y: float, center_z: float, up_x: float, up_y: float, up_z: float) -> None glu lookat .. py:function:: glu_look_at_coords(eye: Union[molib.pdb.coordinate.coordinate.Coordinate3D, collections.abc.Sequence[float], Any], center: Union[molib.pdb.coordinate.coordinate.Coordinate3D, collections.abc.Sequence[float], Any], up: Union[molib.pdb.coordinate.coordinate.Coordinate3D, collections.abc.Sequence[float], Any]) -> None Preferred API: pass three Coordinates (or 3-element sequences / objects with x,y,z).