Camera¶
The camera is used to calculate the viewing frustum in 3D space. All cameras inherit from the Camera class which itself is of the type Node3D and can be added to the scene graph.
Camera¶
Perspective Camera¶
-
class
pysg.camera.
PerspectiveCamera
(*, fov: float, aspect: float, near: float, far: float)¶ Camera which uses frustum for the projection matrix.
Parameters: - fov (float) – Vertical field of view for the perspective camera in degrees.
- aspect (float) – Aspect ratio of camera sensor (with/height).
- near (float) – Camera frustum near plane. Everything closer will be culled.
- far (float) – Camera frustum far plane. Everything farther away will be culled.
Orthographic Camera¶
-
class
pysg.camera.
OrthographicCamera
(*, left: float, right: float, top: float, bottom: float, near: float, far: float)¶ Camera using a box geometry for the projection matrix.
Parameters: - left (float) – Camera volume left (usually -screen_width/2).
- right (float) – Camera volume right (usually screen_width/2).
- top (float) – Camera volume top (usually screen_height/2).
- bottom (float) – Camera volume bottom (usually -screen_height/2)..
- near (float) – Camera frustum near plane. Everything closer will be culled.
- far (float) – Camera frustum far plane. Everything farther away will be culled.