PerspectiveCamera¶
-
class
pyrender.camera.
PerspectiveCamera
(yfov, znear=0.05, zfar=None, aspectRatio=None, name=None)[source]¶ Bases:
pyrender.camera.Camera
A perspective camera for perspective projection.
Parameters: - yfov (float) – The floating-point vertical field of view in radians.
- znear (float) – The floating-point distance to the near clipping plane. If not specified, defaults to 0.05.
- zfar (float, optional) – The floating-point distance to the far clipping plane.
zfar
must be greater thanznear
. If None, the camera uses an infinite projection matrix. - aspectRatio (float, optional) – The floating-point aspect ratio of the field of view. If not specified, the camera uses the viewport’s aspect ratio.
- name (str, optional) – The user-defined name of this object.
Attributes Summary
aspectRatio
The ratio of the width to the height of the field of view. name
The user-defined name of this object. yfov
The vertical field of view in radians. zfar
The distance to the far clipping plane. znear
The distance to the near clipping plane. Methods Summary
get_projection_matrix
([width, height])Return the OpenGL projection matrix for this camera. Attributes Documentation
Methods Documentation