(self)
| 12 | class TestScene: |
| 13 | |
| 14 | def test_intersection(self): |
| 15 | root = Node(name='Root') |
| 16 | a = Node(name="A", parent=root) |
| 17 | b = Node(name="B", parent=a) |
| 18 | b.geometry = Sphere(radius=1.0) |
| 19 | a.translate((1.0, 0.0, 0.0)) |
| 20 | loc = (-2.0, 0.0, 0.0) |
| 21 | vec = (1.0, 0.0, 0.0) |
| 22 | scene = Scene(root=root) |
| 23 | intersections = scene.intersections(loc, vec) |
| 24 | points = tuple([x.point for x in intersections]) |
| 25 | # In frame of a everything is shifed 1 along x |
| 26 | assert points == ((0.0, 0.0, 0.0), (2.0, 0.0, 0.0)) |
| 27 | |
| 28 | def test_intersection_with_rotation_around_x(self): |
| 29 | root = Node(name='Root') |
nothing calls this directly
no test coverage detected