Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 | 5153x 5153x 61x 55x 6x 6x 6x 6x 57x 57x 57x 1x 5162x 2x 5160x 1x 5159x 1x 5158x 1x 5157x 3x 5154x 1x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 5153x 1x 247x 1x 246x 246x 246x 246x 246x 253x 506x 246x 1x 118x 118x 118x 118x 1x 118x 1x 61x 1x 57x 1x 303x 1x 8959x 8959x 8959x 8697x 262x 262x 259x 259x 259x 259x 262x 262x 135x 135x 120x 135x 135x 262x 1x 394x 394x 394x 394x 394x 86x 93x 109x 106x 1x 23628x 12916x 11687x 42028x 29493x 89609x 85x 9690x 1170x 9690x 9109x 1141x 9109x 9714x 1145x 9714x 8692x 1141x 8692x 1016x 7513x 53x 53x 41x 41x 53x 1x 379x 379x 37x 342x 13x 379x 254x 125x 492x 1x 387x 387x 54x 333x 69x 264x 120x 144x 144x 144x 64x 80x 1x 419x 419x 51x 368x 88x 280x 104x 176x 176x 176x 76x 100x 1x 1050x 1050x 101x 949x 295x 654x 298x 356x 356x 133x 223x 107x 116x 1x 1260x 1260x 173x 1087x 267x 820x 254x 566x 566x 232x 334x 167x 167x 1x 222x 222x 222x 222x 222x 147x 222x 222x 222x 222x 222x 222x 222x 222x 888x 110x | import defined from "../Core/defined.js";
import DeveloperError from "../Core/DeveloperError.js";
import Rectangle from "../Core/Rectangle.js";
import Cartographic from "../Core/Cartographic.js";
import QuadtreeTileLoadState from "./QuadtreeTileLoadState.js";
import TileSelectionResult from "./TileSelectionResult.js";
/**
* A simple Least Recently Used (LRU) cache implementation.
*/
class LRUCache {
constructor(maxSize) {
this.maxSize = maxSize;
this.cache = new Map();
}
get(key) {
if (!this.cache.has(key)) {
return undefined;
}
// Move accessed item to the end (most recently used)
const value = this.cache.get(key);
this.cache.delete(key);
this.cache.set(key, value);
return value;
}
set(key, value) {
Iif (this.cache.has(key)) {
this.cache.delete(key);
} else Iif (this.cache.size >= this.maxSize) {
// Remove the least recently used (first entry)
const firstKey = this.cache.keys().next().value;
this.cache.delete(firstKey);
}
this.cache.set(key, value);
}
clear() {
this.cache.clear();
}
}
// Maximum cache entries per tile
const MAX_CACHE_ENTRIES = 1000;
/**
* A single tile in a {@link QuadtreePrimitive}.
*
* @alias QuadtreeTile
* @constructor
* @private
*
* @param {number} options.level The level of the tile in the quadtree.
* @param {number} options.x The X coordinate of the tile in the quadtree. 0 is the westernmost tile.
* @param {number} options.y The Y coordinate of the tile in the quadtree. 0 is the northernmost tile.
* @param {TilingScheme} options.tilingScheme The tiling scheme in which this tile exists.
* @param {QuadtreeTile} [options.parent] This tile's parent, or undefined if this is a root tile.
*/
function QuadtreeTile(options) {
//>>includeStart('debug', pragmas.debug);
if (!defined(options)) {
throw new DeveloperError("options is required.");
}
if (!defined(options.x)) {
throw new DeveloperError("options.x is required.");
} else if (!defined(options.y)) {
throw new DeveloperError("options.y is required.");
} else if (options.x < 0 || options.y < 0) {
throw new DeveloperError(
"options.x and options.y must be greater than or equal to zero.",
);
}
if (!defined(options.level)) {
throw new DeveloperError(
"options.level is required and must be greater than or equal to zero.",
);
}
if (!defined(options.tilingScheme)) {
throw new DeveloperError("options.tilingScheme is required.");
}
//>>includeEnd('debug');
this._tilingScheme = options.tilingScheme;
this._x = options.x;
this._y = options.y;
this._level = options.level;
this._parent = options.parent;
this._rectangle = this._tilingScheme.tileXYToRectangle(
this._x,
this._y,
this._level,
);
this._southwestChild = undefined;
this._southeastChild = undefined;
this._northwestChild = undefined;
this._northeastChild = undefined;
// TileReplacementQueue gets/sets these private properties.
this.replacementPrevious = undefined;
this.replacementNext = undefined;
// The distance from the camera to this tile, updated when the tile is selected
// for rendering. We can get rid of this if we have a better way to sort by
// distance - for example, by using the natural ordering of a quadtree.
// QuadtreePrimitive gets/sets this private property.
this._distance = 0.0;
this._loadPriority = 0.0;
this._customData = new Set();
this._customDataIterator = undefined;
this._addedCustomData = [];
this._removedCustomData = [];
this._lastSelectionResult = TileSelectionResult.NONE;
this._lastSelectionResultFrame = undefined;
this._loadedCallbacks = {};
// Cache for storing computed position values per tile to avoid redundant calculations
this._positionCache = new LRUCache(MAX_CACHE_ENTRIES);
/**
* Gets or sets the current state of the tile in the tile load pipeline.
* @type {QuadtreeTileLoadState}
* @default {@link QuadtreeTileLoadState.START}
*/
this.state = QuadtreeTileLoadState.START;
/**
* Gets or sets a value indicating whether or not the tile is currently renderable.
* @type {boolean}
* @default false
*/
this.renderable = false;
/**
* Gets or set a value indicating whether or not the tile was entirely upsampled from its
* parent tile. If all four children of a parent tile were upsampled from the parent,
* we will render the parent instead of the children even if the LOD indicates that
* the children would be preferable.
* @type {boolean}
* @default false
*/
this.upsampledFromParent = false;
/**
* Gets or sets the additional data associated with this tile. The exact content is specific to the
* {@link QuadtreeTileProvider}.
* @type {object}
* @default undefined
*/
this.data = undefined;
}
/**
* Creates a rectangular set of tiles for level of detail zero, the coarsest, least detailed level.
*
* @memberof QuadtreeTile
*
* @param {TilingScheme} tilingScheme The tiling scheme for which the tiles are to be created.
* @returns {QuadtreeTile[]} An array containing the tiles at level of detail zero, starting with the
* tile in the northwest corner and followed by the tile (if any) to its east.
*/
QuadtreeTile.createLevelZeroTiles = function (tilingScheme) {
//>>includeStart('debug', pragmas.debug);
if (!defined(tilingScheme)) {
throw new DeveloperError("tilingScheme is required.");
}
//>>includeEnd('debug');
const numberOfLevelZeroTilesX = tilingScheme.getNumberOfXTilesAtLevel(0);
const numberOfLevelZeroTilesY = tilingScheme.getNumberOfYTilesAtLevel(0);
const result = new Array(numberOfLevelZeroTilesX * numberOfLevelZeroTilesY);
let index = 0;
for (let y = 0; y < numberOfLevelZeroTilesY; ++y) {
for (let x = 0; x < numberOfLevelZeroTilesX; ++x) {
result[index++] = new QuadtreeTile({
tilingScheme: tilingScheme,
x: x,
y: y,
level: 0,
});
}
}
return result;
};
/**
* Creates a spatial hash key for the given longitude, latitude, and tile level.
* The precision is adjusted based on the tile level and extent to achieve finer precision at higher levels.
*
* This function calculates the spatial hash key by first determining the precision at the given tile for the current maximum screenspace error (MAX_ERROR_PX),
* and then rounding the longitude and latitude to that precision for consistency.
*
* The steps for computing the level precision are as follows:
*
* 1. Compute the resolution (meters per pixel) at the given level:
* level_resolution_m = (2 * PI * RADIUS) / (2^level * TILE_SIZE)
*
* 2. Compute the target precision in meters:
* level_precision_m = level_resolution_m * MAX_ERROR_PX
*
* 3. Compute the target precision to radians:
* level_precision_rad = level_precision_m / BODY_RADIUS
*
* This simplifies to:
* level_precision_rad = (2 * PI * MAX_ERROR_PX) / (2^level * TILE_SIZE)
* which can also be written as:
* level_precision_rad = (PI * MAX_ERROR_PX) / (2^(level-1) * TILE_SIZE)
*
* The computed level_precision_rad is then used to round the input longitude and latitude,
* ensuring that positions that fall within the same spatial bin produce the same hash key.
*
* The constants below are computed once since they are fixed for the given configuration.
*
* @param {number} longitude - The longitude in radians.
* @param {number} latitude - The latitude in radians.
* @param {Rectangle} rectangle - The quadtree tile extents.
* @returns {string} A string representing the spatial hash key.
*/
const TILE_SIZE = 256;
function createSpatialHashKey(
longitude,
latitude,
rectangle,
maximumScreenSpaceError,
) {
// Adjust precision based on quadtree level - higher levels get finer precision
const maxError = (rectangle.width / TILE_SIZE) * maximumScreenSpaceError;
// Round to the grid precision
const lonGrid = Math.floor(longitude / maxError) * maxError;
const latGrid = Math.floor(latitude / maxError) * maxError;
return `${lonGrid.toFixed(10)},${latGrid.toFixed(10)}`;
}
/**
* Generates a unique cache key for a given cartographic position.
* @memberof QuadtreeTile
*
* @param {Cartographic} cartographic The cartographic coordinates.
* @param {number} maximumScreenSpaceError The maximum screen-space error, in pixels, that is allowed.
* A higher maximum error will render fewer tiles and improve performance, while a lower
* value will improve visual quality.
* @returns {string} A string representing the spatial hash key.
*/
QuadtreeTile.prototype._getCacheKey = function (
cartographic,
maximumScreenSpaceError,
) {
return createSpatialHashKey(
cartographic.longitude,
cartographic.latitude,
this._rectangle,
maximumScreenSpaceError,
);
};
/**
* Retrieves a cached position for the specified cartographic position.
*
* @memberof QuadtreeTile
*
* @param {Cartographic} cartographic - The cartographic coordinates.
* @param {number} maximumScreenSpaceError The maximum screen-space error, in pixels, that is allowed.
* A higher maximum error will render fewer tiles and improve performance, while a lower
* value will improve visual quality.
* @returns {object|undefined} The cached position data or undefined if not found.
*/
QuadtreeTile.prototype.getPositionCacheEntry = function (
cartographic,
maximumScreenSpaceError,
) {
return this._positionCache.get(
this._getCacheKey(cartographic, maximumScreenSpaceError),
);
};
/**
* Sets a position on the cache for this tile.
*
* @memberof QuadtreeTile
*
* @param {Cartographic} cartographic - The cartographic coordinates.
* @param {number} maximumScreenSpaceError The maximum screen-space error, in pixels, that is allowed.
* A higher maximum error will render fewer tiles and improve performance, while a lower
* value will improve visual quality.
* @param {object} value - The object to be cached.
*/
QuadtreeTile.prototype.setPositionCacheEntry = function (
cartographic,
maximumScreenSpaceError,
value,
) {
this._positionCache.set(
this._getCacheKey(cartographic, maximumScreenSpaceError),
value,
);
};
/**
* Clears the position cache for this tile.
* This function removes all cached positions that were previously stored
* to optimize height computations.
*
* @memberof QuadtreeTile
*/
QuadtreeTile.prototype.clearPositionCache = function () {
Iif (this._positionCache.size > 0) {
this._positionCache.clear();
}
};
QuadtreeTile.prototype.updateCustomData = function () {
const added = this._addedCustomData;
const removed = this._removedCustomData;
if (added.length === 0 && removed.length === 0) {
return;
}
const customData = this.customData;
for (let i = 0; i < added.length; ++i) {
const data = added[i];
customData.add(data);
const child = childTileAtPosition(this, data.positionCartographic);
child._addedCustomData.push(data);
}
this._addedCustomData.length = 0;
for (let i = 0; i < removed.length; ++i) {
const data = removed[i];
if (customData.has(data)) {
customData.delete(data);
}
const child = childTileAtPosition(this, data.positionCartographic);
child._removedCustomData.push(data);
}
this._removedCustomData.length = 0;
};
const splitPointScratch = new Cartographic();
/**
* Determines which child tile that contains the specified position. Assumes the position is within
* the bounds of the parent tile.
* @private
* @param {QuadtreeTile} tile - The parent tile.
* @param {Cartographic} positionCartographic - The cartographic position.
* @returns {QuadtreeTile} The child tile that contains the position.
*/
function childTileAtPosition(tile, positionCartographic) {
// Can't assume that a given tiling scheme divides a parent into four tiles at its rectangle's center.
// But we can safely take any child tile's rectangle and take its center-facing corner as the parent's split point.
const nwChildRectangle = tile.northwestChild.rectangle;
const tileSplitPoint = Rectangle.southeast(
nwChildRectangle,
splitPointScratch,
);
const x = positionCartographic.longitude >= tileSplitPoint.longitude ? 1 : 0;
const y = positionCartographic.latitude < tileSplitPoint.latitude ? 1 : 0;
switch (y * 2 + x) {
case 0:
return tile.northwestChild;
case 1:
return tile.northeastChild;
case 2:
return tile.southwestChild;
default:
return tile.southeastChild;
}
}
Object.defineProperties(QuadtreeTile.prototype, {
/**
* Gets the tiling scheme used to tile the surface.
* @memberof QuadtreeTile.prototype
* @type {TilingScheme}
*/
tilingScheme: {
get: function () {
return this._tilingScheme;
},
},
/**
* Gets the tile X coordinate.
* @memberof QuadtreeTile.prototype
* @type {number}
*/
x: {
get: function () {
return this._x;
},
},
/**
* Gets the tile Y coordinate.
* @memberof QuadtreeTile.prototype
* @type {number}
*/
y: {
get: function () {
return this._y;
},
},
/**
* Gets the level-of-detail, where zero is the coarsest, least-detailed.
* @memberof QuadtreeTile.prototype
* @type {number}
*/
level: {
get: function () {
return this._level;
},
},
/**
* Gets the parent tile of this tile.
* @memberof QuadtreeTile.prototype
* @type {QuadtreeTile}
*/
parent: {
get: function () {
return this._parent;
},
},
/**
* Gets the cartographic rectangle of the tile, with north, south, east and
* west properties in radians.
* @memberof QuadtreeTile.prototype
* @type {Rectangle}
*/
rectangle: {
get: function () {
return this._rectangle;
},
},
/**
* An array of tiles that is at the next level of the tile tree.
* @memberof QuadtreeTile.prototype
* @type {QuadtreeTile[]}
*/
children: {
get: function () {
return [
this.northwestChild,
this.northeastChild,
this.southwestChild,
this.southeastChild,
];
},
},
/**
* Gets the southwest child tile.
* @memberof QuadtreeTile.prototype
* @type {QuadtreeTile}
*/
southwestChild: {
get: function () {
if (!defined(this._southwestChild)) {
this._southwestChild = new QuadtreeTile({
tilingScheme: this.tilingScheme,
x: this.x * 2,
y: this.y * 2 + 1,
level: this.level + 1,
parent: this,
});
}
return this._southwestChild;
},
},
/**
* Gets the southeast child tile.
* @memberof QuadtreeTile.prototype
* @type {QuadtreeTile}
*/
southeastChild: {
get: function () {
if (!defined(this._southeastChild)) {
this._southeastChild = new QuadtreeTile({
tilingScheme: this.tilingScheme,
x: this.x * 2 + 1,
y: this.y * 2 + 1,
level: this.level + 1,
parent: this,
});
}
return this._southeastChild;
},
},
/**
* Gets the northwest child tile.
* @memberof QuadtreeTile.prototype
* @type {QuadtreeTile}
*/
northwestChild: {
get: function () {
if (!defined(this._northwestChild)) {
this._northwestChild = new QuadtreeTile({
tilingScheme: this.tilingScheme,
x: this.x * 2,
y: this.y * 2,
level: this.level + 1,
parent: this,
});
}
return this._northwestChild;
},
},
/**
* Gets the northeast child tile.
* @memberof QuadtreeTile.prototype
* @type {QuadtreeTile}
*/
northeastChild: {
get: function () {
if (!defined(this._northeastChild)) {
this._northeastChild = new QuadtreeTile({
tilingScheme: this.tilingScheme,
x: this.x * 2 + 1,
y: this.y * 2,
level: this.level + 1,
parent: this,
});
}
return this._northeastChild;
},
},
/**
* A set of objects associated with this tile.
* @memberof QuadtreeTile.prototype
* @type {Set}
*/
customData: {
get: function () {
return this._customData;
},
},
/**
* Gets a value indicating whether or not this tile needs further loading.
* This property will return true if the {@link QuadtreeTile#state} is
* <code>START</code> or <code>LOADING</code>.
* @memberof QuadtreeTile.prototype
* @type {boolean}
*/
needsLoading: {
get: function () {
return this.state < QuadtreeTileLoadState.DONE;
},
},
/**
* Gets a value indicating whether or not this tile is eligible to be unloaded.
* Typically, a tile is ineligible to be unloaded while an asynchronous operation,
* such as a request for data, is in progress on it. A tile will never be
* unloaded while it is needed for rendering, regardless of the value of this
* property. If {@link QuadtreeTile#data} is defined and has an
* <code>eligibleForUnloading</code> property, the value of that property is returned.
* Otherwise, this property returns true.
* @memberof QuadtreeTile.prototype
* @type {boolean}
*/
eligibleForUnloading: {
get: function () {
let result = true;
if (defined(this.data)) {
result = this.data.eligibleForUnloading;
Iif (!defined(result)) {
result = true;
}
}
return result;
},
},
});
QuadtreeTile.prototype.findLevelZeroTile = function (levelZeroTiles, x, y) {
const xTiles = this.tilingScheme.getNumberOfXTilesAtLevel(0);
if (x < 0) {
x += xTiles;
} else if (x >= xTiles) {
x -= xTiles;
}
if (y < 0 || y >= this.tilingScheme.getNumberOfYTilesAtLevel(0)) {
return undefined;
}
return levelZeroTiles.filter(function (tile) {
return tile.x === x && tile.y === y;
})[0];
};
QuadtreeTile.prototype.findTileToWest = function (levelZeroTiles) {
const parent = this.parent;
if (parent === undefined) {
return this.findLevelZeroTile(levelZeroTiles, this.x - 1, this.y);
}
if (parent.southeastChild === this) {
return parent.southwestChild;
} else if (parent.northeastChild === this) {
return parent.northwestChild;
}
const westOfParent = parent.findTileToWest(levelZeroTiles);
Iif (westOfParent === undefined) {
return undefined;
} else if (parent.southwestChild === this) {
return westOfParent.southeastChild;
}
return westOfParent.northeastChild;
};
QuadtreeTile.prototype.findTileToEast = function (levelZeroTiles) {
const parent = this.parent;
if (parent === undefined) {
return this.findLevelZeroTile(levelZeroTiles, this.x + 1, this.y);
}
if (parent.southwestChild === this) {
return parent.southeastChild;
} else if (parent.northwestChild === this) {
return parent.northeastChild;
}
const eastOfParent = parent.findTileToEast(levelZeroTiles);
Iif (eastOfParent === undefined) {
return undefined;
} else if (parent.southeastChild === this) {
return eastOfParent.southwestChild;
}
return eastOfParent.northwestChild;
};
QuadtreeTile.prototype.findTileToSouth = function (levelZeroTiles) {
const parent = this.parent;
if (parent === undefined) {
return this.findLevelZeroTile(levelZeroTiles, this.x, this.y + 1);
}
if (parent.northwestChild === this) {
return parent.southwestChild;
} else if (parent.northeastChild === this) {
return parent.southeastChild;
}
const southOfParent = parent.findTileToSouth(levelZeroTiles);
if (southOfParent === undefined) {
return undefined;
} else if (parent.southwestChild === this) {
return southOfParent.northwestChild;
}
return southOfParent.northeastChild;
};
QuadtreeTile.prototype.findTileToNorth = function (levelZeroTiles) {
const parent = this.parent;
if (parent === undefined) {
return this.findLevelZeroTile(levelZeroTiles, this.x, this.y - 1);
}
if (parent.southwestChild === this) {
return parent.northwestChild;
} else if (parent.southeastChild === this) {
return parent.northeastChild;
}
const northOfParent = parent.findTileToNorth(levelZeroTiles);
if (northOfParent === undefined) {
return undefined;
} else if (parent.northwestChild === this) {
return northOfParent.southwestChild;
}
return northOfParent.southeastChild;
};
/**
* Frees the resources associated with this tile and returns it to the <code>START</code>
* {@link QuadtreeTileLoadState}. If the {@link QuadtreeTile#data} property is defined and it
* has a <code>freeResources</code> method, the method will be invoked.
*
* @memberof QuadtreeTile
*/
QuadtreeTile.prototype.freeResources = function () {
// Clears cached heights when the tile is freed
this.clearPositionCache();
this.state = QuadtreeTileLoadState.START;
this.renderable = false;
this.upsampledFromParent = false;
if (defined(this.data) && defined(this.data.freeResources)) {
this.data.freeResources();
}
freeTile(this._southwestChild);
this._southwestChild = undefined;
freeTile(this._southeastChild);
this._southeastChild = undefined;
freeTile(this._northwestChild);
this._northwestChild = undefined;
freeTile(this._northeastChild);
this._northeastChild = undefined;
};
function freeTile(tile) {
if (defined(tile)) {
tile.freeResources();
}
}
export default QuadtreeTile;
|