@@ -84,17 +84,20 @@ def test_sceneobject_transform():
8484 scene = Scene ()
8585 sceneobj1 = scene .add (Box ())
8686 sceneobj1 .transformation = Translation .from_vector ([10.0 , 0.0 , 0.0 ])
87+ assert sceneobj1 .worldtransformation == sceneobj1 .transformation
8788 assert sceneobj1 .worldtransformation == Translation .from_vector ([10.0 , 0.0 , 0.0 ])
8889 assert sceneobj1 .frame == Frame ([10.0 , 0.0 , 0.0 ], [1.0 , 0.0 , 0.0 ], [0.0 , 1.0 , 0.0 ])
8990
9091 sceneobj2 = scene .add (Box (), parent = sceneobj1 )
9192 sceneobj2 .transformation = Translation .from_vector ([10.0 , 10.0 , 0.0 ])
9293 assert sceneobj2 .worldtransformation == sceneobj1 .transformation * sceneobj2 .transformation
94+ assert sceneobj2 .worldtransformation == Translation .from_vector ([20.0 , 10.0 , 0.0 ])
9395 assert sceneobj2 .frame == Frame ([20.0 , 10.0 , 0.0 ], [1.0 , 0.0 , 0.0 ], [0.0 , 1.0 , 0.0 ])
9496
9597 sceneobj3 = scene .add (Box (), parent = sceneobj2 )
9698 sceneobj3 .transformation = Translation .from_vector ([10.0 , 10.0 , 10.0 ])
9799 assert sceneobj3 .worldtransformation == sceneobj1 .transformation * sceneobj2 .transformation * sceneobj3 .transformation
100+ assert sceneobj3 .worldtransformation == Translation .from_vector ([30.0 , 20.0 , 10.0 ])
98101 assert sceneobj3 .frame == Frame ([30.0 , 20.0 , 10.0 ], [1.0 , 0.0 , 0.0 ], [0.0 , 1.0 , 0.0 ])
99102
100103 def test_scene_clear ():
0 commit comments