Constructor
new FramebufferTile(sector, level, row, column, cacheKey)
Constructs a framebuffer tile.
Parameters:
Name | Type | Description |
---|---|---|
sector |
Sector | The sector this tile covers. |
level |
Level | The level this tile is associated with. |
row |
Number | This tile's row in the associated level. |
column |
Number | This tile's column in the associated level. |
cacheKey |
String | A string uniquely identifying this tile relative to other tiles. |
- Source:
Throws:
-
If the specified sector or level is null or undefined, the row or column arguments are less than zero, or the cache name is null, undefined or empty.
- Type
- ArgumentError
Extends
Members
(readonly) column :Number
The column in this tile's level in which this tile lies in a tile pyramid.
Type:
- Number
- Inherited From:
- Source:
extent :BoundingBox
The Cartesian bounding box of this tile.
Type:
- Inherited From:
- Source:
gpuCacheKey :string
GPU cache key
Type:
- string
- Overrides:
- Source:
(readonly) level :Number
The level at which this tile lies in a tile pyramid.
Type:
- Number
- Inherited From:
- Source:
opacity :Number
This tile's opacity.
Type:
- Number
- Inherited From:
- Default Value:
- 1
- Source:
referencePoint :Vec3
The tile's local origin in model coordinates. Any model coordinate points associates with the tile
should be relative to this point.
Type:
- Inherited From:
- Source:
(readonly) row :Number
The row in this tile's level in which this tile lies in a tile pyramid.
Type:
- Number
- Inherited From:
- Source:
(readonly) sector :Sector
The sector represented by this tile.
Type:
- Inherited From:
- Source:
texelSize :Number
The size in radians of pixels or cells of this tile's associated resource.
Type:
- Number
- Inherited From:
- Source:
tileHeight :Number
The height in pixels or cells of this tile's associated resource.
Type:
- Number
- Inherited From:
- Source:
(readonly) tileKey :String
A key that uniquely identifies this tile within a level set.
Type:
- String
- Inherited From:
- Source:
tileWidth :Number
The width in pixels or cells of this tile's associated resource.
Type:
- Number
- Inherited From:
- Source:
Methods
applyInternalTransform(dc, matrix)
Applies the appropriate texture transform to display this tile's WebGL texture.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
matrix |
Matrix | The matrix to apply the transform to. |
- Overrides:
- Source:
bind(dc) → {Boolean}
Causes this tile's texture to be active. Implements SurfaceTile.bind.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
- Inherited From:
- Source:
Returns:
true if the texture was bound successfully, otherwise false.
- Type
- Boolean
bindFramebuffer(dc) → {Boolean}
Causes this tile's off-screen framebuffer as the current WebGL framebuffer. WebGL operations that affect the
framebuffer now affect this tile's framebuffer, rather than the default WebGL framebuffer.
Color fragments are written to this tile's WebGL texture, which can be made active by calling
SurfaceTile.bind.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
- Source:
Returns:
true if the framebuffer was bound successfully, otherwise false.
- Type
- Boolean
clearFramebuffer(dc)
Causes this tile to clear any color fragments written to its off-screen framebuffer.
Parameters:
Name | Type | Description |
---|---|---|
dc |
The current draw context. |
- Source:
distanceTo(vector) → {number}
Computes an approximate distance from this tile to a specified vector.
Parameters:
Name | Type | Description |
---|---|---|
vector |
Vec3 | The vector to compute the distance to. |
- Inherited From:
- Source:
Throws:
-
If the specified vector is null or undefined.
- Type
- ArgumentError
Returns:
The distance between this tile and the vector.
- Type
- number
(protected) doUpdate(dc)
Updates this tile's frame-dependent properties according to the specified draw context.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
- Inherited From:
- Source:
isEqual(that) → {boolean}
Indicates whether this tile is equivalent to a specified tile.
Parameters:
Name | Type | Description |
---|---|---|
that |
Tile | The tile to check equivalence with. |
- Inherited From:
- Source:
Returns:
true if this tile is equivalent to the specified one, false if
they are not equivalent or the specified tile is null or undefined.
- Type
- boolean
mustSubdivide(dc, detailFactor) → {boolean}
Indicates whether this tile should be subdivided based on the current navigation state and a specified
detail factor.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
detailFactor |
Number | The detail factor to consider. |
- Inherited From:
- Source:
Returns:
true If the tile should be subdivided, otherwise false.
- Type
- boolean
size() → {Number}
Returns the size of the this tile in bytes.
- Inherited From:
- Source:
Returns:
The size of this tile in bytes, not including the associated texture size.
- Type
- Number
subdivide(level, tileFactory) → {Array.<Tile>}
Returns the four children formed by subdividing this tile.
Parameters:
Name | Type | Description |
---|---|---|
level |
Level | The level of the children. |
tileFactory |
TileFactory | The tile factory to use to create the children. |
- Inherited From:
- Source:
Throws:
-
If the specified tile factory or level is null or undefined.
- Type
- ArgumentError
Returns:
An array containing the four child tiles.
- Type
- Array.<Tile>
subdivideToCache(level, tileFactory, cache) → {Array.<Tile>}
Returns the four children formed by subdividing this tile, drawing those children from a specified cache
if they exist there.
Parameters:
Name | Type | Description |
---|---|---|
level |
Level | The level of the children. |
tileFactory |
TileFactory | The tile factory to use to create the children. |
cache |
MemoryCache | A memory cache that may contain pre-existing child tiles. If non-null, the cache is checked for a child collection prior to creating that tile. If one exists in the cache it is returned rather than creating a new collection of children. If a new collection is created, it is added to the cache. |
- Inherited From:
- Source:
Throws:
-
If the specified tile factory or level is null or undefined.
- Type
- ArgumentError
Returns:
An array containing the four tiles.
- Type
- Array.<Tile>
update(dc)
Updates this tile's frame-dependent properties as necessary, according to the specified draw context.
The tile's frame-dependent properties, include the extent (bounding volume). These properties are dependent
on the tile's sector and the elevation values currently in memory, and change when those dependencies change.
Therefore update
must be called once per frame before the extent and any other frame-dependent
properties are used. update
intelligently determines when it is necessary to recompute these
properties, and does nothing if the state of all dependencies has not changed since the last call.
Parameters:
Name | Type | Description |
---|---|---|
dc |
DrawContext | The current draw context. |
- Inherited From:
- Source: