(self)
| 62 | assert np.allclose(c.vector_to_node((0, 0, 1), d), (0, 0, 1)) |
| 63 | |
| 64 | def test_intersections(self): |
| 65 | a = Node(name="A", parent=None) |
| 66 | b = Node(name="B", parent=a) |
| 67 | b.geometry = Sphere(radius=1.0) |
| 68 | loc = (-1.0, 0.0, 0.0) |
| 69 | vec = (1.0, 0.0, 0.0) |
| 70 | intersections = b.intersections(loc, vec) |
| 71 | points = np.array([x.point for x in intersections]) |
| 72 | assert np.allclose(points, ((-1.0, 0.0, 0.0), (1.0, 0.0, 0.0))) |
| 73 | |
| 74 | def test_intersection_when_on_surface(self): |
| 75 | """ Make sure we return intersection points even with zero distance from ray. |
nothing calls this directly
no test coverage detected