Exemplo n.º 1
0
        public void CheckOverlapMember_Positive()
        {
            var a = new AABB(new Vector2(0.0f, 0.0f), new Vector2(10.0f, 10.0f));
            var b = new AABB(new Vector2(20.0f, 20.0f), new Vector2(15.0f, 15.0f));

            var result = a.CheckOverlap(b);

            Assert.True(result);
        }
Exemplo n.º 2
0
        public void CheckOverlapMember_Negative()
        {
            var a = new AABB(new Vector2(0.0f, 0.0f), new Vector2(10.0f, 10.0f));
            var b = new AABB(new Vector2(30.0f, 30.0f), new Vector2(15.0f, 15.0f));

            var result = a.CheckOverlap(b);

            Assert.False(result);
        }
Exemplo n.º 3
0
        public void CheckOverlapStatic_Positive()
        {
            var a = new AABB(new Vector2(0.0f, 0.0f), new Vector2(10.0f, 10.0f));
            var b = new AABB(new Vector2(20.0f, 20.0f), new Vector2(15.0f, 15.0f));

            var result = AABB.CheckOverlap(a, b);

            Assert.True(result);
        }