Ejemplo n.º 1
0
        public BoundingBox(BoundingBox copy, WorldObject holder)
        {
            IsActive = true;

            BaseLeft = copy.BaseLeft;
            BaseTop = copy.BaseTop;
            BaseRight = copy.BaseRight;
            BaseBottom = copy.BaseBottom;

            BaseZ = copy.BaseZ;

            Holder = holder;
        }
Ejemplo n.º 2
0
        public Boolean BoundingBoxTest(BoundingBox testBB, Vector2f offset)
        {
            if (!IsActive || !testBB.IsActive)
                return false;

            if (Z != testBB.Z)
                return false;

            if (Holder == testBB.Holder)
                return false;

            if (this == testBB)
                return false;

            return !(Left + offset.X >= testBB.Right ||
                     Right + offset.X <= testBB.Left ||
                     Top + offset.Y >= testBB.Bottom ||
                     Bottom + offset.Y <= testBB.Top);
        }
Ejemplo n.º 3
0
        public Boolean BoundingBoxTest(BoundingBox testBB)
        {
            if (!IsActive || !testBB.IsActive)
                return false;

            if (Z != testBB.Z)
                return false;

            if (Holder == testBB.Holder)
                return false;

            if (this == testBB)
                return false;

            return !(Left >= testBB.Right ||
                     Right <= testBB.Left ||
                     Top >= testBB.Bottom ||
                     Bottom <= testBB.Top);
        }