Exemple #1
0
 private void AddTristrip(PointTriangleStrip t)
 {
     _tristrips.Add(t);
     foreach (Facepoint p in t._points)
     {
         if (!_nodes.Contains(p.NodeID))
         {
             _nodes.Add(p.NodeID);
         }
     }
 }
Exemple #2
0
        private bool TryAdd(PointTriangleStrip 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)
            {
                AddTristrip(t);
                return(true);
            }
            return(false);
        }
        private bool TryAdd(PointTriangleStrip 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)
            {
                AddTristrip(t);
                return true;
            }
            return false;
        }
 private void AddTristrip(PointTriangleStrip t)
 {
     _tristrips.Add(t);
     foreach (Facepoint p in t._points)
         if (!_nodes.Contains(p.NodeID))
             _nodes.Add(p.NodeID);
 }