Esempio n. 1
0
 public static PageRect RectFor(PageAddress addr)
 {
   PageRect ret = new PageRect();
   ret.X = addr.X * Page.TileSizeUnits;
   ret.Z = addr.Z * Page.TileSizeUnits;
   ret.W = Page.TileSizeUnits;
   ret.H = Page.TileSizeUnits;
   return ret;
 }
Esempio n. 2
0
 public void AddPage(Page p)
 {
   if (pages_.Count == 0)
   {
     minAddress_ = p.Address;
     maxAddress_ = p.Address;
     bounds_ = p.Rect;
   }
   else
   {
     bounds_.Union(p.Rect);
     if (p.Address.X < minAddress_.X) minAddress_.X = p.Address.X;
     if (p.Address.Z < minAddress_.Z) minAddress_.Z = p.Address.Z;
     if (p.Address.X > maxAddress_.X) maxAddress_.X = p.Address.X;
     if (p.Address.Z > maxAddress_.Z) maxAddress_.Z = p.Address.Z;
   }
   p.SetOwner(this);
   pages_.Add(p.Address, p);
 }
Esempio n. 3
0
 public void SetAddress(PageAddress addr, PageRect rect)
 {
     addr_ = addr;
     rect_ = rect;
 }
Esempio n. 4
0
 internal Page(PageOwner owner, PageAddress addr)
 {
     addr_  = addr;
     owner_ = owner;
     rect_  = PageAddress.RectFor(addr);
 }
Esempio n. 5
0
 public void SetAddress(PageAddress addr, PageRect rect)
 {
   addr_ = addr;
   rect_ = rect;
 }
Esempio n. 6
0
 internal Page(PageOwner owner, PageAddress addr)
 {
   addr_ = addr;
   owner_ = owner;
   rect_ = PageAddress.RectFor(addr);
 }
Esempio n. 7
0
 public Page PageAt(PageAddress pa)
 {
   Page ret = null;
   pages_.TryGetValue(pa, out ret);
   return ret;
 }