raillabel.format.quaternion module

class raillabel.format.quaternion.Quaternion(x: float, y: float, z: float, w: float)

Bases: object

A rotation represented by a quaternion.

classmethod from_json(json: tuple[float, float, float, float]) Quaternion

Construct an instant of this class from RailLabel JSON data.

to_json() tuple[float, float, float, float]

Export this object into the RailLabel JSON format.

w: float

The omega component of the quaternion.

x: float

The x component of the quaternion.

y: float

The y component of the quaternion.

z: float

The z component of the quaternion.