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))
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))
def test_create_zeros(self): result = aabb.create_zeros() self.assertTrue(np.array_equal(result, [[0, 0, 0], [0, 0, 0]]))
def test_create_zeros(self): result = aabb.create_zeros() self.assertTrue(np.array_equal(result, [[0,0,0],[0,0,0]]))