Exemplo n.º 1
0
    def test_add_aabbs(self):
        a = aabb.create_zeros()

        a1 = np.array([
            [-1.0,-1.0,-1.0],
            [ 1.0, 1.0, 1.0]
        ])
        result = aabb.add_aabbs(a, a1)
        expected = np.array([
            [-1.0,-1.0,-1.0],
            [ 1.0, 1.0, 1.0]
        ])
        self.assertTrue(np.array_equal(result, expected))


        a = np.array([
            [-1.0,-1.0,-1.0],
            [ 1.0, 1.0, 1.0]
        ])
        a2 = np.array([
            [-1.0, 0.0,-1.0],
            [ 2.0, 1.0, 1.0]
        ])
        result = aabb.add_aabbs(a, a2)
        expected = np.array([
            [-1.0,-1.0,-1.0],
            [ 2.0, 1.0, 1.0]
        ])
        self.assertTrue(np.array_equal(result, expected))
Exemplo n.º 2
0
    def test_add_aabbs(self):
        a = aabb.create_zeros()

        a1 = np.array([[-1.0, -1.0, -1.0], [1.0, 1.0, 1.0]])
        result = aabb.add_aabbs(a, a1)
        expected = np.array([[-1.0, -1.0, -1.0], [1.0, 1.0, 1.0]])
        self.assertTrue(np.array_equal(result, expected))

        a = np.array([[-1.0, -1.0, -1.0], [1.0, 1.0, 1.0]])
        a2 = np.array([[-1.0, 0.0, -1.0], [2.0, 1.0, 1.0]])
        result = aabb.add_aabbs(a, a2)
        expected = np.array([[-1.0, -1.0, -1.0], [2.0, 1.0, 1.0]])
        self.assertTrue(np.array_equal(result, expected))
Exemplo n.º 3
0
 def test_create_zeros(self):
     result = aabb.create_zeros()
     self.assertTrue(np.array_equal(result, [[0, 0, 0], [0, 0, 0]]))
Exemplo n.º 4
0
 def test_create_zeros(self):
     result = aabb.create_zeros()
     self.assertTrue(np.array_equal(result, [[0,0,0],[0,0,0]]))