data.yoffs = (float)i / (float)params.ytiles;
gen_heightfield(tile.mesh, txsz, tysz, params.max_height,
- params.tile_usub, params.tile_vsub, calc_height,
- (void*)&data);
+ params.tile_usub, params.tile_vsub, calc_height,
+ (void *)&data);
float xoffs = j * txsz - params.xsz / 2.0 + txsz / 2.0;
float yoffs = i * tysz - params.ysz / 2.0 + tysz / 2.0;
tiles.push_back(tile);
-/*
- the terrain scene stores objects only
- no need to fill the mat, mesh std::vectors
-*/
+ /*
+ the terrain scene stores objects only
+ no need to fill the mat, mesh std::vectors
+ */
Object *o = new Object;
o->mesh = tile.mesh;
o->material = &material;
static float calc_height(float u, float v, void *ptr)
{
- GenData *data = (GenData*)ptr;
+ GenData *data = (GenData *)ptr;
const TerrainParams *tp = data->tp;
u = u / tp->xtiles + data->xoffs;