//============================================================================ //! 内部ポイントの場合は加算して次へ渡す private void _GetCountingInnerPoint(ref int oCount, VersusPointChecker iPointChecker) { var src_Point = iPointChecker.GetSrcConnectPoint(); //どちらとも繋がりが無ければリーフと見なす if (src_Point[0] != null || src_Point[1] != null) { if (src_Point[0] != null) { _GetCountingInnerPoint(ref oCount, src_Point[0]); } if (src_Point[1] != null) { _GetCountingInnerPoint(ref oCount, src_Point[1]); } ++oCount; } }
//============================================================================ //! 指定ポイントチェッカーがリーフの場合はリストに追加、それ以外は派生 private void _GetLeafPoint(ref List <VersusPointChecker> oLeafList, VersusPointChecker iPointChecker) { var src_Point = iPointChecker.GetSrcConnectPoint(); //どちらとも繋がりが無ければリーフと見なす if (src_Point[0] == null && src_Point[1] == null) { oLeafList.Add(iPointChecker); } else { if (src_Point[0] != null) { _GetLeafPoint(ref oLeafList, src_Point[0]); } if (src_Point[1] != null) { _GetLeafPoint(ref oLeafList, src_Point[1]); } } }