picogl.backend.modern.core.shader.mvp.control

Classes

MVPControl

Encapsulates camera position, orientation, and MVP matrix handling.

Functions

dummy_update_handler(self)

Module Contents

class picogl.backend.modern.core.shader.mvp.control.MVPControl(width: int = 800, height: int = 480)[source]

Encapsulates camera position, orientation, and MVP matrix handling.

fov = None[source]
z_angle = None[source]
position = None[source]
x_angle = None[source]
y_angle = None[source]
screen_width = 800[source]
screen_height = 480[source]
reset() None[source]

Reset to default camera position and orientation.

move_forward(distance: float) None[source]
move_up(distance: float) None[source]
move_right(distance: float) None[source]
pitch(delta: float) None[source]

Rotate camera up/down (pitch).

look_upward(yaw)[source]

look_upward

yaw(delta: float) None[source]

Rotate camera left/right (yaw).

turn(delta: float)[source]
set_fov(fov_degrees: float) None[source]

Change field of view.

compute_matrices() None[source]

Recompute direction, right, up, and view/projection matrices.

resize(width: int, height: int) None[source]

Resize the viewport and update projection matrix.

calc_mvp(model_matrix: pyglm.glm.mat4) pyglm.glm.mat4[source]

Return full MVP matrix for a given model transform.

picogl.backend.modern.core.shader.mvp.control.dummy_update_handler(self)[source]