Class: TileQuadNode

TileQuadNode

A utility class that describes a quad tree of tiles. Each tile on a given level has up to four corresponding tiles on the next level. A TileQuadNode uses the attributes nw (i.e. northwest), ne, sw, se to link to the quad nodes on the next level. The previous attributes links to the quad one level below that holds the given quad as nw, ne, sw, or se. We use this node class because we need a representation of tiles that are needed but not loaded yet to compute tiles which can be abandoned to reduce the memory pressure.

new TileQuadNode (Number, Number, Number, String)

Name Type Description
Number level

The level the quad node belongs to

Number col

The col of the quad

Number row

The level the quad node belongs to

String url

The level the quad node belongs to

Methods

Link this quad node to the given previous node. Use the north and west flags to address nw, ne, sw, and se.

Name Type Description
TileQuadNode node

The TileQuadNode to remove

Boolean north

Link to north (true) or south (false)

Boolean west

Link to west (true) or east (false)

noQuads ()

Return True if this node has no successors and can be used as an indicator of tiles to free.

Unlink the given quad node

Name Type Description
TileQuadNode node

The TileQuadNode to remove