Exemple #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)
Exemple #2
0
 def test_constructor(self):
     ray = Ray(Vector(0, 0, 0), Vector(0, 0, 1))
     self.assertEqual(ray.direction.x, 0)
Exemple #3
0
 def test_constructor(self):
     ray = Ray(Vector(0, 0, 0), Vector(0, 0, 1))