boxToBox() public static method

public static boxToBox ( Box first, Box second, CollisionResult &result ) : bool
first Box
second Box
result CollisionResult
return bool
Exemplo n.º 1
0
        public override bool collidesWithShape(Shape other, out CollisionResult result)
        {
            // special, high-performance cases. otherwise we fall back to Polygon.
            if (isUnrotated && other is Box && (other as Box).isUnrotated)
            {
                return(ShapeCollisions.boxToBox(this, other as Box, out result));
            }

            // TODO: get Minkowski working for circle to box
            //if( other is Circle )

            // fallthrough to standard cases
            return(base.collidesWithShape(other, out result));
        }