Intersects() public static method

public static Intersects ( Rect nodeBound, IQtUserData userData ) : bool
nodeBound Rect
userData IQtUserData
return bool
示例#1
0
    public virtual void Receive(IQtUserData userData)
    {
        if (!UQtAlgo.Intersects(Bound, userData))
        {
            return;
        }

        foreach (var sub in SubNodes)
        {
            sub.Receive(userData);
        }
    }
示例#2
0
    public override void Receive(IQtUserData userData)
    {
        if (!UQtAlgo.Intersects(Bound, userData))
        {
            return;
        }

        if (Bound.Contains(new Vector2(userData.GetCenter().x, userData.GetCenter().z)))
        {
            _ownedObjects.Add(userData);
        }
        else
        {
            _affectedObjects.Add(userData);
        }
    }