@@ -87,18 +87,21 @@ def test_sceneobject_transform():
8787 assert sceneobj1 .worldtransformation == sceneobj1 .transformation
8888 assert sceneobj1 .worldtransformation == Translation .from_vector ([10.0 , 0.0 , 0.0 ])
8989 assert sceneobj1 .frame == Frame ([10.0 , 0.0 , 0.0 ], [1.0 , 0.0 , 0.0 ], [0.0 , 1.0 , 0.0 ])
90+ assert sceneobj1 .frame .to_transformation () == Translation .from_vector ([10.0 , 0.0 , 0.0 ])
9091
9192 sceneobj2 = scene .add (Box (), parent = sceneobj1 )
9293 sceneobj2 .transformation = Translation .from_vector ([10.0 , 10.0 , 0.0 ])
9394 assert sceneobj2 .worldtransformation == sceneobj1 .transformation * sceneobj2 .transformation
9495 assert sceneobj2 .worldtransformation == Translation .from_vector ([20.0 , 10.0 , 0.0 ])
9596 assert sceneobj2 .frame == Frame ([20.0 , 10.0 , 0.0 ], [1.0 , 0.0 , 0.0 ], [0.0 , 1.0 , 0.0 ])
97+ assert sceneobj2 .frame .to_transformation () == Translation .from_vector ([20.0 , 10.0 , 0.0 ])
9698
9799 sceneobj3 = scene .add (Box (), parent = sceneobj2 )
98100 sceneobj3 .transformation = Translation .from_vector ([10.0 , 10.0 , 10.0 ])
99101 assert sceneobj3 .worldtransformation == sceneobj1 .transformation * sceneobj2 .transformation * sceneobj3 .transformation
100102 assert sceneobj3 .worldtransformation == Translation .from_vector ([30.0 , 20.0 , 10.0 ])
101103 assert sceneobj3 .frame == Frame ([30.0 , 20.0 , 10.0 ], [1.0 , 0.0 , 0.0 ], [0.0 , 1.0 , 0.0 ])
104+ assert sceneobj3 .frame .to_transformation () == Translation .from_vector ([30.0 , 20.0 , 10.0 ])
102105
103106 def test_scene_clear ():
104107 scene = Scene ()
0 commit comments