Reflection.to_data

Reflection.to_data()[source]

Convert a Transformation object to a data dict.

Returns

dict – A dictionary with a transformation matrix stored under the key “matrix”.

Examples

>>> matrix = [[1, 0, 0, 3], [0, 1, 0, 4], [0, 0, 1, 5], [0, 0, 0, 1]]
>>> data = {'matrix': matrix}
>>> T = Transformation.from_data(data)
>>> T.to_data() == data
True