
8 I Geometry Manipulation
Figure 1.4. Color coded mesh topology for L =8andL
c
=4.
Figure 1.5. Wire frame showing different levels of terrain mesh detail.
The following level shift is used to skip resolution levels that are too small for
the camera at ground height:
int shift=( int ) floor ( log (1+cameragroundheight /5));
The CPU code is
float snapvalue=Q ;
float snapmax=2 snapvalue ;
possnap0 . x=floor ( camerapos . x / snapmax +0.01f ) snapmax ;