Camera¶
-
moderngl_window.scene.
Camera
[source]¶ Simple camera class containing projection.
# create a camera camera = Camera(fov=60.0, aspect_ratio=1.0, near=1.0, far=100.0) # Get the current camera matrix as numpy array print(camera.matrix) # Get projection matrix as numpy array print(camera.projection.matrix)
Methods¶
-
Camera.
__init__
(fov=60.0, aspect_ratio=1.0, near=1.0, far=100.0)[source]¶ Initialize camera using a specific projection
- Keyword Arguments
fov (float) – Field of view
aspect_ratio (float) – Aspect ratio
near (float) – Near plane
far (float) – Far plane