Ejemplo n.º 1
0
 def inverse_rotation_matrix(self):
     return Quaternion.from_rotation_matrix(self.rotation_matrix()).inverse().to_rotation_matrix()
Ejemplo n.º 2
0
 def from_coords(coord_a, coord_b):
     q1 = Quaternion.from_rotation_matrix(
         coord_b.rotation_matrix()).inverse()
     q2 = Quaternion.from_rotation_matrix(coord_a.rotation_matrix())
     return Transformation.build(coord_b.origin - coord_a.origin, -q1 * q2)