Esempio n. 1
0
    private bool IsValidJoin(BezierGenerator curr, BezierGenerator join, JoinType currGeneratorType, JoinType targetType)
    {
        int currOrder = 0;
        int joinOrder = 0;

        if (currGeneratorType == JoinType.LastURow || currGeneratorType == JoinType.FirstURow)
        {
            currOrder = curr.vOrder;
        }
        else
        {
            currOrder = curr.uOrder;
        }

        if (targetType == JoinType.LastURow || targetType == JoinType.FirstURow)
        {
            joinOrder = join.vOrder;
        }
        else
        {
            joinOrder = join.uOrder;
        }

        return(join != null && currOrder == joinOrder && join.IsValid() && curr != join);
    }