picogl.backend.gl.legacy.view

Classes

LegacyGLTranslation

Translation Parameters

LegacyGLZoom

Zoom parameters.

LegacyGLRotation

CameraPerspective

Represents parameters required to define a camera perspective.

LegacyGLViewTransform

Encapsulates legacy OpenGL view rotation, translation, and zoom.

Module Contents

class picogl.backend.gl.legacy.view.LegacyGLTranslation[source]

Translation Parameters

x: float = 0.0[source]
y: float = 0.0[source]
z: float = 0.0[source]
apply()[source]
_apply_zoom(value: float = 0.01)[source]
class picogl.backend.gl.legacy.view.LegacyGLZoom[source]

Zoom parameters.

value: float = -5.0[source]

def apply(self): self.apply_translation_and_zoom(self.translation, self.value)

apply_translation_and_zoom(translation, zoom)[source]
rescale()[source]
class picogl.backend.gl.legacy.view.LegacyGLRotation[source]
x: float = 0.0[source]
y: float = 0.0[source]
z: float = 0.0[source]
apply()[source]
initialize()[source]
class picogl.backend.gl.legacy.view.CameraPerspective[source]

Represents parameters required to define a camera perspective.

This class provides default values for the far clipping plane, near clipping plane, and field of view in the y-direction (fovy) for a perspective camera. These parameters can be used to set up a perspective projection for 3D rendering.

far: float = 100.0[source]
near: float = 0.1[source]
fovy: float = 45.0[source]
class picogl.backend.gl.legacy.view.LegacyGLViewTransform[source]

Encapsulates legacy OpenGL view rotation, translation, and zoom.

rotation: LegacyGLRotation[source]
translation: LegacyGLTranslation[source]
zoom: LegacyGLZoom[source]
property rotation_x: float[source]
property rotation_y: float[source]
property translation_x: float[source]
property translation_y: float[source]
apply() → None[source]

Apply the view transform using the legacy OpenGL matrix stack.

reset() → None[source]

Reset view transformation to defaults.