Class Terrain-Patch

This represents a geo-mip-mapped ‘patch’ which the terrain composed of.
It is the primary visual component of the terrain. Each patch has a choice between a number
of levels of detail, with the number of triangles within the patch quadrupling with each
additional level of detail.

Part of:

package terrain

Slot

cache-level
The requested level to be held in cache.
Initform:0, Initargs::cache-level; Accessors:cache-level-of; Type:(signed-byte 8).
desired-level
The requested level from the view which it would be best to see this geometry rendered at.
Initform:0, Initargs::desired-level; Accessors:desired-level-of; Type:(signed-byte 8).
deviation
Measure of the average altitudinal devation from a level 0 basic triangle pair.
Initform:0.0; Accessors:deviation; Type:single-float.
draw-level
The current level of detail that this patch is being drawn at.
Initform:0, Initargs::draw-level; Accessors:draw-level-of; Type:(signed-byte 8).
east
Neighbour patch to the east.
Accessors:east-of; Type:terrain-patch.
interleaved-arrays
Array of the currently stored geometries indexed by level of detail. 0 is lowest detail.
Accessors:interleaved-arrays-of; Type:array.
levels
Array of two-dimensional arrays of nodes going down from this terrain patch.
Type:array.
max-z
The maximum known altitude of a vertex in the geometries of this patch.
Initform:0.0; Accessors:max-z; Type:single-float.
min-z
The minimum known altitude of a vertex in the geometries of this patch.
Initform:0.0; Accessors:min-z; Type:single-float.
north
Neighbour patch to the north.
Accessors:north-of; Type:terrain-patch.
num-levels
The currently stored number of levels of geometry loaded and available for use.
Initform:0, Initargs::num-levels; Accessors:num-levels-of; Type:(signed-byte 8).
south
Neighbour patch to the south.
Accessors:south-of; Type:terrain-patch.
visible
Whether or not this patch is visible in the current view frustum and should be drawn or not.
Accessors:visible-p; Type:boolean.
west
Neighbour patch to the west.
Accessors:west-of; Type:terrain-patch.
z-distanceInitform:0.0; Accessors:z-distance; Type:single-float.

Direct Method

for-each-visible-triangle
interleaved-arrays
root-node