The QuadLOD node switches the representation of a feature based upon its distance from the viewpoint. Only two levels of detail can be specified, however arbitarily deep hierarchies can be produced by nesting several QuadLOD nodes. The node works by displaying a single piece of geometry by default. Then when the viewpoint nears this geometry it is replaced by four alternative geometries. This is meant to represent a single low resolution terrain tile that is then subdivided into four higher resolution quadrants, e.g.

Currently, the EXTERNPROTO interface looks like this
EXTERNPROTO QuadLOD [
field MFString parentUrl # the URL for the low resolution tile
field MFString child1Url # the URL for high resolution tile no. 1
field MFString child2Url # the URL for high resolution tile no. 2
field MFString child3Url # the URL for high resolution tile no. 3
field MFString child4Url # the URL for high resolution tile no. 4
field SFVec3f parentCenter # center of the low res tile's bounding box
field SFVec3f parentSize # size of the low res tile's bounding box
field SFVec3f switchSize # the size of the switch zone bounding box
eventOut MFNode children # exposes the nodes built by this PROTO
field SFBool enabled # is the LOD node enabled (default = TRUE)
eventIn SFBool set_enabled # change the setting of enabled
eventOut SFBool enabled_changed # query the current enabled setting
] "QuadLOD.wrl#QuadLOD"
The QuadLOD node is a grouping node that specifies two different levels of detail of an object, such as a tile of terrain. The level of detail is switched depending upon the viewers relation to the bounding box with center at parentCenter and dimensions give by switchSize. When outside this bounding box, only the geometry for parent_url is displayed, but when the viewer enters the switch bounding box this geometry is replaced with the four geometries specified by child_url1 through child_url4.
The bounding boxes for each of the four children are calculated from the values of parentCenter and parentSize. This is done assuming a child layout ordering as given in the above figure, and assuming that the Z axis represents up (terrain height) - i.e. the parent bounding box is segmented into quarters over the X-Y plane.
The geometry for the four higher resolution tiles are only loaded into the memory when the user is within the switching volume. Similarly, these are unloaded from memory when the user is outwith this volume. Any tiles that are outside of the view frustum are removed from the scene graph (but not unloaded from memory), as long as you specify bounding box information.
The enabled field can be used to specify whether you want the QuadLOD node to be enabled (TRUE) or disabled (FALSE). A disabled QuadLOD node freezes the currently displayed nodes and performs no further switches of LOD (i.e. performs no further loading or unloading of data).
An example use of this EXTERNPROTO might be:
QuadLOD {
parent_url "lores.wrl"
child_url1 "hires1.wrl"
child_url2 "hires2.wrl"
child_url3 "hires3.wrl"
child_url4 "hires4.wrl"
parentSize 2 2 2
switchSize 8 8 8
}
The following sources and examples are made available to evaluate this new node:
Also, this node currently does not work with CosmoPlayer under IRIX because it does not support Java or JavaScript in the Script node, and the VrmlScript implementation is incomplete. JavaScript support is expected for CP 1.03 for IRIX, at which time this node should work for the SGI platform. WorldView compatability has not yet been evaluated.