Frame.from_list
- classmethod Frame.from_list(values)
Construct a frame from a list of 12 or 16 float values.
- Parameters
values (list[float]) – The list of 12 or 16 values representing a 4x4 matrix.
- Returns
Frame
– The constructed frame.- Raises
ValueError – If the length of the list is neither 12 nor 16.
Notes
Since the transformation matrix follows the row-major order, the translational components must be at the list’s indices 3, 7, 11.
Examples
>>> l = [-1.0, 0.0, 0.0, 8110, 0.0, 0.0, -1.0, 7020, 0.0, -1.0, 0.0, 1810] >>> f = Frame.from_list(l)