Exemplo n.º 1
0
 def test_intersection(self):
     cube = Cube(Vector(0, 0, 5), 2, 10, 10)
     ray = Ray(Vector(0, 0, 0), Vector(0, 0.25, 1))
     intersection = cube.intersection(ray)
Exemplo n.º 2
0
 def test_constructor(self):
     ray = Ray(Vector(0, 0, 0), Vector(0, 0, 1))
     self.assertEqual(ray.direction.x, 0)
Exemplo n.º 3
0
 def test_constructor(self):
     ray = Ray(Vector(0, 0, 0), Vector(0, 0, 1))