Example #1
0
 def test_localize_position_rotation(self):
     """Euler rotation is applied in the correct order."""
     v1 = [(A, B, C)]
     rot = (90., 0., -90.)
     frame = GroupFrame(rotation=rot)
     v2 = frame.localize_position(v1)
     self.assertAllClose((-C, A, -B), v2[0])
Example #2
0
 def test_localize_position_all(self):
     """Transformations are applied in the correct order."""
     v1 = [(A, B, C)]
     pos = (D, 0, 0)
     rot = (0, 0, -90)
     frame = GroupFrame(position=pos, rotation=rot)
     v2 = frame.localize_position(v1)
     self.assertAllClose((-B, A-D, C), v2[0])
Example #3
0
 def test_localize_position_translation(self):
     v1 = [(A, B, C)]
     dv = (D, E, F)
     frame = GroupFrame(position=dv)
     v2 = frame.localize_position(v1)
     self.assertAllClose(v1[0], v2[0] + dv)