TerrainQuadTree
Manages hierarchical quad-tree of terrain chunks with dynamic LOD.Constructor
config- Optional configuration overrides
TerrainQuadTree instance
Example:
Methods
setListener
listener- Object implementingQuadTreeListenerinterface
update
playerX- Player world X coordinateplayerZ- Player world Z coordinate
true if tree structure changed, false otherwise
Example:
getFinalNodes
TerrainQuadNode instances
Example:
dispose
Properties
totalNodeCount
visualChunkCount
TerrainQuadNode
Individual node in the terrain quad-tree.Properties
Methods
check
update
setNeighbours
n- North neighbore- East neighbors- South neighborw- West neighbor
isInside
x- World X coordinatez- World Z coordinate
true if point is inside, false otherwise
getDeepestNodeAt
x- World X coordinatez- World Z coordinate
null if not found
QuadTreeListener
Interface for receiving quad-tree events.onNodeNeedsGeometry
Called when a node needs terrain geometry generated. Parameters:node- Node that needs geometry
onNodeDestroyGeometry
Called when a node’s geometry should be destroyed. Parameters:node- Node whose geometry should be destroyed
QuadTreeConfig
Configuration for terrain quad-tree LOD system.Fields
Example
Type Definitions
QuadPosition
CardinalDirection
Related APIs
Biome API
BiomeType enum and tree configuration API
Tree Instancing API
GLBTreeBatchedInstancer API reference
Terrain System
TerrainSystem API for height queries
World API
World class and system management