Exemple #1
0
        private bool TryAdd(PointLine t)
        {
            List <ushort> newIds = new List <ushort>();

            ushort x = t._x.NodeID;
            ushort y = t._y.NodeID;

            if (!_nodes.Contains(x) && !newIds.Contains(x))
            {
                newIds.Add(x);
            }

            if (!_nodes.Contains(y) && !newIds.Contains(y))
            {
                newIds.Add(y);
            }

            //There's a limit of 10 matrices per group...
            if (newIds.Count + _nodes.Count <= _nodeCountMax)
            {
                AddLine(t);
                return(true);
            }

            return(false);
        }
Exemple #2
0
 private void AddLine(PointLine t)
 {
     _lines.Add(t);
     if (!_nodes.Contains(t._x.NodeID))
     {
         _nodes.Add(t._x.NodeID);
     }
     if (!_nodes.Contains(t._y.NodeID))
     {
         _nodes.Add(t._y.NodeID);
     }
 }