public override BoundingBox[] GetIntersecting(Vector3 position, BoundingBox box) { List <BoundingBox> intersecting = new List <BoundingBox>(); foreach (var b in Boxes.OrderByDescending(x => x.Max.Y)) { if (new BoundingBox(position + b.Min, position + b.Max).Contains(box) == ContainmentType.Intersects) { intersecting.Add(b); } } return(intersecting.ToArray()); }
public void PrintTower() { var baseOfHeighestTower = Boxes.OrderByDescending(GetMaxHeightTower).First(); PrintTower(baseOfHeighestTower); }