コード例 #1
0
 private void AddTristrip(PointTriangleStrip t)
 {
     _tristrips.Add(t);
     foreach (GX_Vertex p in t._points)
     {
         if (!_nodes.Contains(p.PNMTXIDX))
         {
             _nodes.Add(p.PNMTXIDX);
         }
     }
 }
コード例 #2
0
        private bool TryAdd(PointTriangleStrip t)
        {
            List <ushort> newIds = new List <ushort>();

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

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