picogl.backend.legacy.core.camera.matrix
This module provides a function to update the OpenGL modelview matrix based on camera parameters such as translation (panning), rotation (orbit angles), and zoom. It is typically used in interactive 3D applications to reflect user-controlled camera movements in the rendering pipeline.
Dependencies:
numpy
PyOpenGL
Functions:
Parameters:
translation: NumPy array of shape (2,) representing X and Y panning.
rotation: NumPy array of shape (3,) representing rotation angles in degrees around X, Y, and Z axes.
zoom_value: Float representing zoom along the Z-axis.
Usage Example:
update_camera_matrix(
translation=np.array([0.1, -0.2]),
rotation=np.array([30.0, 45.0, 0.0]),
zoom_value=-5.0
)
Functions
|
update_camera_matrix |
Module Contents
- picogl.backend.legacy.core.camera.matrix.update_camera_matrix(translation: numpy.ndarray, rotation: numpy.ndarray, zoom_value: float) None[source]
update_camera_matrix
- Parameters:
translation – np.ndarray of shape (2,) - [x_pan, y_pan]
rotation – np.ndarray of shape (3,) - [x_rot, y_rot, z_rot] in degrees
zoom_value – float - zoom along z-axis
Updates the OpenGL modelview matrix using translation, rotation, and zoom values.