Пример #1
0
        static IEnumerable<ISpatialCollection> GetSpatials()
        {
            var a = new LinearSpatialCollection();
            a.SetAreaSize(SpatialSize);

            var b = new DynamicGridSpatialCollection();
            b.SetAreaSize(SpatialSize);

            var c = new StaticGridSpatialCollection();
            c.SetAreaSize(SpatialSize);

            return new ISpatialCollection[] { a, b };
        }
Пример #2
0
        static IEnumerable<SpatialAggregate> GetSpatials(out Entity someEntity)
        {
            var aEntities = CreateEntities(64, new Vector2(32), SpatialSize - new Vector2(32));
            var bEntities = CreateEntities(64, new Vector2(32), SpatialSize - new Vector2(32));
            var cEntities = CreateEntities(64, new Vector2(32), SpatialSize - new Vector2(32));
            someEntity = aEntities.First();

            var a = new LinearSpatialCollection();
            a.SetAreaSize(SpatialSize);
            a.Add(aEntities);

            var b = new DynamicGridSpatialCollection();
            b.SetAreaSize(SpatialSize);
            b.Add(bEntities);

            var c = new DynamicGridSpatialCollection();
            c.SetAreaSize(SpatialSize);
            c.Add(cEntities);

            return new SpatialAggregate[] { new SpatialAggregate(new ISpatialCollection[] { a, b, c }) };
        }