cesium-native 0.47.0
|
The base class for something that requests loading of specific tiles from a 3D Tiles Tileset
.
More...
#include <Cesium3DTilesSelection/TileLoadRequester.h>
Public Member Functions | |
virtual double | getWeight () const =0 |
Gets the weight of this requester relative to others. | |
virtual bool | hasMoreTilesToLoadInWorkerThread () const =0 |
Determines if this requester has any more tiles that need to be loaded in a worker thread. To determine if a particular Tile needs to be loaded in a worker thread, call Tile::needsWorkerThreadLoading . | |
virtual Tile * | getNextTileToLoadInWorkerThread ()=0 |
Gets the next Tile that this requester would like loaded in a worker thread. | |
virtual bool | hasMoreTilesToLoadInMainThread () const =0 |
Determines if this requester has any more tiles that need to be loaded in the main thread. To determine if a particular Tile needs to be loaded in the main thread, call Tile::needsMainThreadLoading . | |
virtual Tile * | getNextTileToLoadInMainThread ()=0 |
Gets the next Tile that this requester would like loaded in the main thread. | |
void | unregister () noexcept |
Unregister this requester with the {link Tileset} with which it is currently registered. Once unregistered, it will not influence tile loads until registered again. | |
Protected Member Functions | |
TileLoadRequester () noexcept | |
Constructs a new instance. | |
TileLoadRequester (const TileLoadRequester &rhs) noexcept | |
Constructs a new instance as a copy of an existing one. | |
TileLoadRequester (TileLoadRequester &&rhs) noexcept | |
Moves an existing instance into a new one. | |
virtual | ~TileLoadRequester () noexcept |
Destroys this instance. | |
Friends | |
class | Tileset |
The base class for something that requests loading of specific tiles from a 3D Tiles Tileset
.
When multiple requesters are registered, each is given a fair chance to load tiles in proportion with its TileLoadRequester::getWeight
.
Methods of this class may only be called from the main thread.
Definition at line 22 of file TileLoadRequester.h.
|
protectednoexcept |
Constructs a new instance as a copy of an existing one.
The copy will not be registered with any Cesium3DTilesSelection::Tileset
, even if the existing instance was.
rhs | The existing instance to copy. |
|
protectednoexcept |
Moves an existing instance into a new one.
The newly-constructed instance will be registered with the same Cesium3DTilesSelection::Tileset
as the rhs
. After the constructor returns, the rhs
will no longer be registered.
rhs | The existing instance to move into this one. |
|
pure virtual |
Gets the next Tile
that this requester would like loaded in the main thread.
When hasMoreTilesToLoadInMainThread
returns false, this method can and should return nullptr
. However, when that method returns true, this method must return a valid Tile
pointer.
The returned tile must have a reference count greater than zero. Otherwise, the Tile would be immediately eligible for unloading, so it doesn't make sense to load it. In debug builds, this is enforced with an assertion. In release builds, unreferenced tiles are silently ignored.
Implemented in Cesium3DTilesSelection::TilesetViewGroup.
|
pure virtual |
Gets the next Tile
that this requester would like loaded in a worker thread.
When hasMoreTilesToLoadInWorkerThread
returns false, this method can and should return nullptr
. However, when that method returns true, this method must return a valid Tile
pointer.
The returned tile must have a reference count greater than zero. Otherwise, the Tile would be immediately eligible for unloading, so it doesn't make sense to load it. In debug builds, this is enforced with an assertion. In release builds, unreferenced tiles are silently ignored.
Implemented in Cesium3DTilesSelection::TilesetViewGroup.
|
pure virtual |
Gets the weight of this requester relative to others.
Most requesters should return a weight of 1.0. When all requesters have the same weight, they will all have an equal opportunity to load tiles. If one requester's weight is 2.0 and the rest are 1.0, that requester will have twice as many opportunities to load tiles as the others.
A very high weight will prevent all other requesters from loading tiles until this requester has none left to load. A very low weight (but above 0.0!) will allow all other requesters to finish loading tiles before this one starts.
Implemented in Cesium3DTilesSelection::TilesetViewGroup.
|
pure virtual |
Determines if this requester has any more tiles that need to be loaded in the main thread. To determine if a particular Tile
needs to be loaded in the main thread, call Tile::needsMainThreadLoading
.
Implemented in Cesium3DTilesSelection::TilesetViewGroup.
|
pure virtual |
Determines if this requester has any more tiles that need to be loaded in a worker thread. To determine if a particular Tile
needs to be loaded in a worker thread, call Tile::needsWorkerThreadLoading
.
Implemented in Cesium3DTilesSelection::TilesetViewGroup.
|
noexcept |
Unregister this requester with the {link Tileset} with which it is currently registered. Once unregistered, it will not influence tile loads until registered again.
If this instance is not currently registered, this method does nothing.
To register an instance with a Tileset
, call Tileset::registerLoadRequester
on the tileset.
|
friend |
Definition at line 145 of file TileLoadRequester.h.