Beispiel #1
0
        private World()
        {
            var x = RegionSize * TileDimension * 0.5f;

            WorldBounds = new BoundingBox2D(new Vector(-x, -x), new Vector(x, x));
            CreateRegions();
        }
Beispiel #2
0
        //public bool OverlapPoint(Vector point) {
        //    return Min.X <= point.X && Min.Z <= point.Z && Max.X > point.X && Max.Z > point.Z;
        //}

        public BoundingBox2D UnionWith(BoundingBox2D other)
        {
            return(new BoundingBox2D {
                Min = Vector.Min(this.Min, other.Min), Max = Vector.Max(this.Max, other.Max)
            });
        }
Beispiel #3
0
 public Region(BoundingBox2D boundingBox, int x, int z)
 {
     Boundaries = boundingBox;
     X          = x;
     Z          = z;
 }