Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 336 vs 337 for /trunk/Source Code/Environment/Terrain/Terrain.cpp

Diff revisions: vs.
  @@ -196,8 +196,8 @@
196 196 vec2<I32> posI((I32)(posF.x), (I32)(posF.y) );
197 197 vec2<F32> posD(posF.x - posI.x, posF.y - posI.y );
198 198
199 - if(posI.x >= (I32)_terrainWidth - 1) posI.x = _terrainWidth - 2;
200 - if(posI.y >= (I32)_terrainHeight - 1) posI.y = _terrainHeight - 2;
199 + if(posI.x >= (I32)_terrainWidth - 1) posI.x = _terrainWidth - 2;
200 + if(posI.y >= (I32)_terrainHeight - 1) posI.y = _terrainHeight - 2;
201 201
202 202 assert(posI.x >= 0 && posI.x < (I32)(_terrainWidth)-1 && posI.y >= 0 && posI.y < (I32)(_terrainHeight) - 1);
203 203
  @@ -217,12 +217,12 @@
217 217 vec3<F32> Terrain::getNormal(F32 x_clampf, F32 z_clampf) const{
218 218 assert(!(x_clampf<.0f || z_clampf<.0f || x_clampf>1.0f || z_clampf>1.0f));
219 219
220 - vec2<F32> posF( x_clampf * _terrainWidth, z_clampf * _terrainHeight );
221 - vec2<I32> posI( (I32)(x_clampf * _terrainWidth), (I32)(z_clampf * _terrainHeight) );
222 - vec2<F32> posD( posF.x - posI.x, posF.y - posI.y );
220 + vec2<F32> posF( x_clampf * _terrainWidth, z_clampf * _terrainHeight );
221 + vec2<I32> posI( (I32)(x_clampf * _terrainWidth), (I32)(z_clampf * _terrainHeight) );
222 + vec2<F32> posD( posF.x - posI.x, posF.y - posI.y );
223 223
224 224 if(posI.x >= (I32)(_terrainWidth)-1) posI.x = (I32)(_terrainWidth) - 2;
225 - if(posI.y >= (I32)(_terrainHeight)-1) posI.y = (I32)(_terrainHeight) - 2;
225 + if(posI.y >= (I32)(_terrainHeight)-1) posI.y = (I32)(_terrainHeight) - 2;
226 226
227 227 assert(posI.x >= 0 && posI.x < (I32)(_terrainWidth)-1 && posI.y >= 0 && posI.y < (I32)(_terrainHeight)-1);
228 228
  @@ -237,12 +237,12 @@
237 237 vec3<F32> Terrain::getTangent(F32 x_clampf, F32 z_clampf) const{
238 238 assert(!(x_clampf<.0f || z_clampf<.0f || x_clampf>1.0f || z_clampf>1.0f));
239 239
240 - vec2<F32> posF( x_clampf * _terrainWidth, z_clampf * _terrainHeight );
241 - vec2<I32> posI( (I32)(x_clampf * _terrainWidth), (I32)(z_clampf * _terrainHeight) );
242 - vec2<F32> posD( posF.x - posI.x, posF.y - posI.y );
240 + vec2<F32> posF( x_clampf * _terrainWidth, z_clampf * _terrainHeight );
241 + vec2<I32> posI( (I32)(x_clampf * _terrainWidth), (I32)(z_clampf * _terrainHeight) );
242 + vec2<F32> posD( posF.x - posI.x, posF.y - posI.y );
243 243
244 244 if (posI.x >= (I32)(_terrainWidth)-1) posI.x = (I32)(_terrainWidth)-2;
245 - if (posI.y >= (I32)(_terrainHeight)-1) posI.y = (I32)(_terrainHeight)-2;
245 + if (posI.y >= (I32)(_terrainHeight)-1) posI.y = (I32)(_terrainHeight)-2;
246 246
247 247 assert(posI.x >= 0 && posI.x < (I32)(_terrainWidth)-1 && posI.y >= 0 && posI.y < (I32)(_terrainHeight)-1);
248 248
  @@ -258,7 +258,7 @@
258 258 {
259 259 RemoveResource(_blendMap);
260 260 RemoveResource(_tileMaps);
261 - RemoveResource(_normalMaps);
261 + RemoveResource(_normalMaps);
262 262 }
263 263
264 264 };