public void _CreateSpaceSpanGroup(SolidSpanGroup solidSpanGroup)
        {
            Dictionary <int, LinkedList <SolidSpan> > soildSpanDict = solidSpanGroup.soildSpanDict;
            LinkedList <SolidSpan> solidSpanList;
            SpaceSpan spaceSpan;

            int[]            cellIdxs;
            Vector3d[]       voxRect;
            CellSpaceSpans   cellSpaceSpans;
            List <SpaceSpan> spaceSpanList;
            double           startpos;
            double           endpos;

            foreach (var item in soildSpanDict)
            {
                cellIdxs = solidSpanGroup.GetCellIdxs(item.Key);
                voxRect  = voxSpace.GetFloorGridCellRect(cellIdxs[0], cellIdxs[1]);

                solidSpanList = item.Value;
                var node = solidSpanList.First;

                cellSpaceSpans = new CellSpaceSpans();
                spaceSpanList  = new List <SpaceSpan>();
                cellSpaceSpans.spaceSpanList = spaceSpanList;
                cellSpaceSpans.rect          = voxRect;

                for (; node != null; node = node.Next)
                {
                    startpos = node.Value.endPos;
                    if (node.Next != null)
                    {
                        endpos = node.Next.Value.startPos;
                    }
                    else
                    {
                        endpos = startpos + 1000000;
                    }

                    if (endpos - startpos >= minWalkHeight)
                    {
                        spaceSpan                = new SpaceSpan();
                        spaceSpan.startPos       = startpos;
                        spaceSpan.endPos         = endpos;
                        spaceSpan.cellSpaceSpans = cellSpaceSpans;
                        spaceSpan.connectSpan    = new SpaceSpan[] { null, null, null, null };
                        spaceSpanList.Add(spaceSpan);
                    }
                }

                spaceSpanDict[item.Key] = cellSpaceSpans;
            }
        }
 public void CreateSpaceSpanGroup(SolidSpanGroup solidSpanGroup)
 {
     _CreateSpaceSpanGroup(solidSpanGroup);
     CreateSpansConnectRelation();
 }