fiftyone.core.threed.transformation#

Classes:

Vector3([x, y, z])

Represents a three-dimensional vector.

Euler([x, y, z, degrees, sequence])

Represents intrinsic rotations about the object's own principal axes.

Quaternion([x, y, z, w])

Represents a quaternion.

Functions:

class fiftyone.core.threed.transformation.Vector3(x: float = 0.0, y: float = 0.0, z: float = 0.0)#

Bases: BaseValidatedDataClass

Represents a three-dimensional vector.

Attributes:

x

y

z

Methods:

to_arr()

Converts the vector to a numpy array.

property x: float#
property y: float#
property z: float#
to_arr()#

Converts the vector to a numpy array.

class fiftyone.core.threed.transformation.Euler(x: float = 0.0, y: float = 0.0, z: float = 0.0, degrees: bool = False, sequence: Literal['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX'] = 'XYZ')#

Bases: Vector3

Represents intrinsic rotations about the object’s own principal axes.

Attributes:

Methods:

to_quaternion()

Converts the euler angles to a quaternion.

to_arr()

Converts the vector to a numpy array.

property degrees: bool#
property sequence: Literal['XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX']#
to_quaternion()#

Converts the euler angles to a quaternion.

to_arr()#

Converts the vector to a numpy array.

property x: float#
property y: float#
property z: float#
class fiftyone.core.threed.transformation.Quaternion(x: float = 0.0, y: float = 0.0, z: float = 0.0, w: float = 1.0)#

Bases: BaseValidatedDataClass

Represents a quaternion.

Attributes:

x

y

z

w

Methods:

to_euler([degrees, sequence])

Converts the quaternion into euler angles.

to_arr()

Converts the quaternion to a numpy array.

property x: float#
property y: float#
property z: float#
property w: float#
to_euler(degrees=False, sequence='XYZ')#

Converts the quaternion into euler angles.

to_arr()#

Converts the quaternion to a numpy array.

fiftyone.core.threed.transformation.normalize_to_vec3(v: Vector3 | List[float] | Tuple[float] | array | None) Vector3 | None#
fiftyone.core.threed.transformation.coerce_to_vec3(v: Vector3 | List[float] | Tuple[float] | array | None) Vector3 | None#