Exemplo n.º 1
0
 private void AddTristrip(PointTriangleStrip t)
 {
     _tristrips.Add(t);
     foreach (GXVertex p in t._points)
     {
         if (!_nodes.Contains(p.PMXID))
         {
             _nodes.Add(p.PMXID);
         }
     }
 }
Exemplo n.º 2
0
        private bool TryAdd(PointTriangleStrip t)
        {
            List <ushort> newIds = new List <ushort>();

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

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