public ToastTools(ToastTools parent, int level, int x, int y)
 {
     Parent = parent;
     X = x;
     Y = y;
     Level = level;
     InitializeGrids();
     TopLeft = new Vector3d(Vector3d.Scale(bounds[0, 0].Position, 1));
     BottomRight = new Vector3d(Vector3d.Scale(bounds[2, 2].Position, 1));
     TopRight = new Vector3d(Vector3d.Scale(bounds[2, 0].Position, 1));
     BottomLeft = new Vector3d(Vector3d.Scale(bounds[0, 2].Position, 1));
 }
        public ToastTools GetChild(int id)
        {
            if (children[id] == null)
            {
                var x1 =0;
                var y1 = 0;
                switch(id)
                {
                    case 0:
                        y1=0;
                        x1=0;
                        break;
                    case 1:
                        y1=0;
                        x1=1;
                        break;
                    case 2:
                        y1=1;
                        x1=0;
                        break;
                    case 3:
                        y1=1;
                        x1=1;
                        break;
                }

                children[id] = new ToastTools(this, Level + 1, X * 2 + x1, Y * 2 + y1);
            }

            return children[id];
        }