fiftyone.core.threed.camera#

Camera definition for 3D visualization.

Copyright 2017-2025, Voxel51, Inc.

Classes:

PerspectiveCamera([position, look_at, up, ...])

Represents the configuration of a 3D perspective camera.

class fiftyone.core.threed.camera.PerspectiveCamera(position: Vector3 | None = None, look_at: Vector3 | None = None, up: Literal['X', 'Y', 'Z', '-X', '-Y', '-Z'] | None = None, aspect: float | None = None, fov: float = 50.0, near: float = 0.1, far: float = 2000.0)#

Bases: BaseValidatedDataClass

Represents the configuration of a 3D perspective camera.

Parameters:
  • position (None) – the position of the camera. If None, the camera position is calculated based on the bounding box of the scene

  • look_at (None) – the point the camera is looking at. If None, the camera looks at the center of the scene

  • up (None) – the orthonormal axis that is considered up. Must be one of “X”, “Y”, “Z”, “-X”, “-Y”, or “-Z”. If None, it will fallback to the global up as defined in 3D plugin settings. If that too is not defined, it will fallback to “Y”

  • aspect (None) – the aspect ratio of the camera. If None, the aspect ratio is calculated based on the width and height of the canvas

  • fov (50) – camera frustum vertical field of view in degrees. If None, the field of view is 50 degrees

  • near (0.1) – the near clipping plane of the camera

  • far (2000) – the far clipping plane of the camera

Attributes:

Methods:

property position: Vector3#
property look_at: Vector3#
property up: str | None#
property aspect#
property fov: float#
property near: float#
property far: float#
as_dict() dict#