PerspectiveCamera¶
-
class
pyrender.camera.PerspectiveCamera(yfov, znear=0.05, zfar=None, aspectRatio=None, name=None)[source]¶ Bases:
pyrender.camera.CameraA 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.
zfarmust 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
aspectRatioThe ratio of the width to the height of the field of view. nameThe user-defined name of this object. yfovThe vertical field of view in radians. zfarThe distance to the far clipping plane. znearThe 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