20 , vertices(
GFXTRI, 4, InitialVertices, 4, true )
32 RootCornerData.
Parent = NULL;
33 RootCornerData.
Square = NULL;
35 RootCornerData.
Level = 15;
36 RootCornerData.
xorg = 0;
37 RootCornerData.
zorg = 0;
38 RootCornerData.
Verts[0].
Y = 0;
40 RootCornerData.
Verts[1].
Y = 0;
42 RootCornerData.
Verts[2].
Y = 0;
44 RootCornerData.
Verts[3].
Y = 0;
50 VertexAllocated = VertexCount = 4;
62 LoadXML( filename, Scales, radius );
71 Vector( 1.0F/Scales.i, 1.0F/Scales.j, 1.0F/Scales.k ),
98 SetNeighbors( east->root, north->root, west->root, south->root );
104 delete nonlinear_transform;
110 float TotalTerrainSizeX,
111 float TotalTerrainSizeZ )
const
114 if (TotalTerrainSizeX) {
116 Loc.i = fmod( (
double) Loc.i, (
double) TotalTerrainSizeX );
118 Loc.i += TotalTerrainSizeX;
119 TotalTerrainSizeX = tmpx;
121 Loc.k = fmod( (
double) Loc.k, (
double) TotalTerrainSizeZ );
123 Loc.k += TotalTerrainSizeZ;
124 TotalTerrainSizeZ = tmpx;
126 TotalTerrainSizeX = Loc.i;
127 TotalTerrainSizeZ = Loc.k;
129 float tmp = root->
GetHeight( RootCornerData, Loc.i, Loc.k, norm );
130 if (tmp > -FLT_MAX) {
145 float TotalTerrainSizeX,
146 float TotalTerrainSizeZ )
const
149 if (TotalTerrainSizeX) {
152 Location.i = fmod( Location.i, TotalTerrainSizeX );
153 Location.k = fmod( Location.k, TotalTerrainSizeZ );
158 Location.i += TotalTerrainSizeX;
160 Location.k += TotalTerrainSizeZ;
162 float tmp = Location.j-root->
GetHeight( RootCornerData, Location.i, Location.k, normal );
178 Vector( 1.0F/Scales.i, 1.0F/Scales.j, 1.0F/Scales.k ),
180 root->
Update( RootCornerData,
183 numstages, whichstage, uo );
214 root->
Render( RootCornerData,
218 void QuadTree::LoadData()
232 printf(
"Loading height grids...\n" );
238 printf(
"Building quadtree data...\n" );
248 printf(
"Adding quadtree data...\n" );
258 printf(
"Adding quadtree data...\n" );