Example #1
0
 private void AddLinestrip(PointLineStrip t)
 {
     _linestrips.Add(t);
     foreach (Facepoint p in t._points)
     {
         if (!_nodes.Contains(p.NodeID))
         {
             _nodes.Add(p.NodeID);
         }
     }
 }
Example #2
0
        private bool TryAdd(PointLineStrip t)
        {
            List <ushort> newIds = new List <ushort>();

            foreach (Facepoint p in t._points)
            {
                ushort id = p.NodeID;
                if (!_nodes.Contains(id) && !newIds.Contains(id))
                {
                    newIds.Add(id);
                }
            }

            if (newIds.Count + _nodes.Count <= _nodeCountMax)
            {
                AddLinestrip(t);
                return(true);
            }
            return(false);
        }