Appearance
KBE3D / KBCore / Cesium / TileAvailability
类: TileAvailability
Reports the availability of tiles in a TilingScheme.
参数
The tiling scheme in which to report availability.
参数
The maximum tile level that is potentially available.
方法
addAvailableTileRange()
addAvailableTileRange(
level:number,startX:number,startY:number,endX:number,endY:number):void
Marks a rectangular range of tiles in a particular level as being available. For best performance, add your ranges in order of increasing level.
参数
level
number
The level.
startX
number
The X coordinate of the first available tiles at the level.
startY
number
The Y coordinate of the first available tiles at the level.
endX
number
The X coordinate of the last available tiles at the level.
endY
number
The Y coordinate of the last available tiles at the level.
返回
void
computeMaximumLevelAtPosition()
computeMaximumLevelAtPosition(
position:Cartographic):number
Determines the level of the most detailed tile covering the position. This function usually completes in time logarithmic to the number of rectangles added with TileAvailability#addAvailableTileRange.
参数
position
The position for which to determine the maximum available level. The height component is ignored.
返回
number
The level of the most detailed tile covering the position.
computeBestAvailableLevelOverRectangle()
computeBestAvailableLevelOverRectangle(
rectangle:Rectangle):number
Finds the most detailed level that is available everywhere within a given rectangle. More detailed tiles may be available in parts of the rectangle, but not the whole thing. The return value of this function may be safely passed to sampleTerrain for any position within the rectangle. This function usually completes in time logarithmic to the number of rectangles added with TileAvailability#addAvailableTileRange.
参数
rectangle
The rectangle.
返回
number
The best available level for the entire rectangle.
isTileAvailable()
isTileAvailable(
level:number,x:number,y:number):boolean
Determines if a particular tile is available.
参数
level
number
The tile level to check.
x
number
The X coordinate of the tile to check.
y
number
The Y coordinate of the tile to check.
返回
boolean
True if the tile is available; otherwise, false.
computeChildMaskForTile()
computeChildMaskForTile(
level:number,x:number,y:number):number
Computes a bit mask indicating which of a tile's four children exist. If a child's bit is set, a tile is available for that child. If it is cleared, the tile is not available. The bit values are as follows: <table> <tr><th>Bit Position</th><th>Bit Value</th><th>Child Tile</th></tr> <tr><td>0</td><td>1</td><td>Southwest</td></tr> <tr><td>1</td><td>2</td><td>Southeast</td></tr> <tr><td>2</td><td>4</td><td>Northwest</td></tr> <tr><td>3</td><td>8</td><td>Northeast</td></tr> </table>
参数
level
number
The level of the parent tile.
x
number
The X coordinate of the parent tile.
y
number
The Y coordinate of the parent tile.
返回
number
The bit mask indicating child availability.
构造函数
构造函数
new TileAvailability(
tilingScheme:TilingScheme,maximumLevel:number):TileAvailability
参数
tilingScheme
maximumLevel
number
返回
TileAvailability
