예제 #1
0
        public IEnumerable <Cell> GetCellsAt(Vec3 pos, bool test_2d, float z_tolerance, bool include_replacement = true)
        {
            var cells = Cells.Where(x => (test_2d ? x.Contains2D(pos) : x.Contains(pos, z_tolerance)));

            if (include_replacement)
            {
                return(cells.Concat(ReplacementCells.Where(x => (test_2d ? x.Contains2D(pos) : x.Contains(pos, z_tolerance)))));
            }
            return(cells);
        }
예제 #2
0
파일: GridCell.cs 프로젝트: HiPoEGH/Nav
        public List <Cell> GetCells(Func <Cell, bool> predicate, bool allow_replacement_cells = true)
        {
            var result = Cells.Where(predicate);

            if (allow_replacement_cells)
            {
                result = result.Concat(ReplacementCells.Where(predicate));
            }

            return(result.ToList());
        }
예제 #3
0
        public List <Cell> GetCells(Func <Cell, bool> predicate, bool include_replacement = true)
        {
            var result = Cells.Where(predicate).ToList();

            if (include_replacement)
            {
                result.AddRange(ReplacementCells.Where(predicate));
            }

            return(result);
        }
예제 #4
0
파일: GridCell.cs 프로젝트: HiPoEGH/Nav
 public IEnumerable <Cell> GetCellsAt(Vec3 pos, bool test_2d, float z_tolerance)
 {
     return(Cells.Where(x => (test_2d ? x.Contains2D(pos) : x.Contains(pos, z_tolerance))).
            Concat(ReplacementCells.Where(x => (test_2d ? x.Contains2D(pos) : x.Contains(pos, z_tolerance)))));
 }