/// <summary>
 /// Request a tile
 /// If the tile has siblings in the used set, request them at the same time since we will need all of them to split the parent tile
 /// Set request priority based on the closest sibling, request all siblings with the same priority since we need all of them to load before
 /// any of them can be made visible
 /// </summary>
 /// <param name="tile"></param>
 void RequestTile(Unity3DTile tile)
 {
     if (tile.Parent == null)
     {
         tile.RequestContent(TilePriority(tile));
     }
     else
     {
         float priority = float.MaxValue;
         for (int i = 0; i < tile.Parent.Children.Count; i++)
         {
             if (tile.Parent.Children[i].FrameState.IsUsedThisFrame(this.frameCount))
             {
                 priority = Mathf.Min(TilePriority(tile.Parent.Children[i]), priority);
             }
         }
         for (int i = 0; i < tile.Parent.Children.Count; i++)
         {
             if (tile.Parent.Children[i].FrameState.IsUsedThisFrame(this.frameCount))
             {
                 tile.Parent.Children[i].RequestContent(priority);
             }
         }
     }
 }
Пример #2
0
 /// <summary>
 /// Request a tile
 /// If the tile has siblings in the used set, request them at the same time since we will need all of them to split the parent tile
 /// Set request priority based on the closest sibling, request all siblings with the same priority since we need all of them to load before
 /// any of them can be made visible
 /// </summary>
 /// <param name="tile"></param>
 void RequestTile(Unity3DTile tile)
 {
     if (tile.Parent == null)
     {
         tile.RequestContent(this.tileset.TilesetOptions.TilePriority(tile)); // was -tile.FrameState.DistanceToCamera, bug?
     }
     else
     {
         float priority = float.MaxValue;
         for (int i = 0; i < tile.Parent.Children.Count; i++)
         {
             if (tile.Parent.Children[i].FrameState.IsUsedThisFrame(this.frameCount))
             {
                 priority = Mathf.Min(this.tileset.TilesetOptions.TilePriority(tile.Parent.Children[i]), priority);
             }
         }
         for (int i = 0; i < tile.Parent.Children.Count; i++)
         {
             if (tile.Parent.Children[i].FrameState.IsUsedThisFrame(this.frameCount))
             {
                 tile.Parent.Children[i].RequestContent(priority);
             }
         }
     }
 }
 /// <summary>
 /// Request a tile
 /// If the tile has siblings in the used set, request them at the same time since we will need all of them to split the parent tile
 /// Set request priority based on the closest sibling, request all siblings with the same priority since we need all of them to load before
 /// any of them can be made visible
 /// </summary>
 /// <param name="tile"></param>
 void RequestTile(Unity3DTile tile)
 {
     if (tile.Parent == null)
     {
         tile.RequestContent(-tile.FrameState.DistanceToCamera);
     }
     else
     {
         float minDist = float.MaxValue;
         for (int i = 0; i < tile.Parent.Children.Count; i++)
         {
             if (tile.Parent.Children[i].FrameState.IsUsedThisFrame(this.frameCount))
             {
                 minDist = Mathf.Min(tile.Parent.Children[i].FrameState.DistanceToCamera, minDist);
             }
         }
         for (int i = 0; i < tile.Parent.Children.Count; i++)
         {
             if (tile.Parent.Children[i].FrameState.IsUsedThisFrame(this.frameCount))
             {
                 tile.Parent.Children[i].RequestContent(-minDist);
             }
         }
     }
 }
 void RequestTile(Unity3DTile tile)
 {
     if (tile.Parent == null)
     {
         tile.RequestContent(tile.FrameState.Priority);
     }
     else
     {
         for (int i = 0; i < tile.Parent.Children.Count; i++)
         {
             if (tile.Parent.Children[i].FrameState.IsUsedThisFrame)
             {
                 tile.Parent.Children[i].RequestContent(tile.FrameState.Priority);
             }
         }
     }
 }