picogl.backend.modern.core.shader.mvp.helpers
Set up model_matrix view projection (MVP) matrix for 3D rendering.
This function constructs a combined projection and view matrix based on camera orbit angles, zoom level, and viewport aspect ratio. It simulates a camera orbiting around the origin and returns a 4x4 transformation matrix suitable for use in OpenGL shaders.
- Example:
mvp_parameters = setup_mvp(angle_x=0.5, angle_y=1.0, zoom=1.2, aspect=16/9)
Functions
|
setup_mvp |
|
setup_mvp |
Module Contents
- picogl.backend.modern.core.shader.mvp.helpers.setup_mvp(angle_x: float, angle_y: float, zoom: float, aspect: float) pyglm.glm.mat4[source]
setup_mvp
- Parameters:
- Returns:
Combined projection * view matrix.
- Return type:
glm.mat4
- picogl.backend.modern.core.shader.mvp.helpers.np_setup_mvp(shader, width, height, angle_x, angle_y, zoom) numpy.ndarray[source]
setup_mvp
- Returns:
ndarray[Any, dtype[bool_]]