Constructor
# new XYZTileNode(x, y, z, parent)
A tree structure to hold slippy tiles, and their 3d meshes.
A node in a tree of slippy tiles. Each node has up to 4 children. The children have a z index of one more than the parent.
The constructor takes the arguments x,y, z, and and optional parent.
Parameters:
Name | Type | Description |
---|---|---|
x |
Number
|
|
y |
Number
|
|
z |
Number
|
|
parent |
XYZTileNode
|
Methods
# getLeafNodes() → {Array}
[XYZTileNode, XYZTileNode, ...]
Array
# async getMartiniMesh(martiniError) → {Object}
Get TIN from martini mesh
Parameters:
Name | Type | Default | Description |
---|---|---|---|
martiniError |
Number
|
0.1 |
martini mesh
Object
# getNodeByID(id) → {XYZTileNode}
Parameters:
Name | Type | Description |
---|---|---|
id |
String
|
return the node with the given id, or undefined.
# getNonLeafNodes() → {Array}
[XYZTileNode, XYZTileNode, ...]
Array
# async getTerrainMesh(martiniError, homeMatrix, material) → {THREE.Mesh}
Create and update the 3d mesh for this node.
Parameters:
Name | Type | Description |
---|---|---|
martiniError |
Number
|
|
homeMatrix |
THREE.Matrix4
|
|
material |
THREE.Material
|
THREE.Mesh
# split() → {Array}
Get all the children of this node, and create them if they don't exist.
[XYZTileNode, XYZTileNode, XYZTileNode, XYZTileNode]
Array