float phi = 25;
float theta = 0;
-float dist = 4;
+float dist = 16;
ShaderManager *sdr_man;
sdr_man = new ShaderManager;
camera = new OrbitCamera;
- camera->set_orbit_params(phi, theta, dist);
// scene_ground = new Scene;
// if(!scene_ground->load("data/ground.obj")) {
TerrainParams p;
p.xsz = 50;
p.ysz = 50;
- p.max_height = 1;
- p.xtiles = 1; //40;
- p.ytiles = 1; // 40;
- p.tile_usub = 8;
- p.tile_vsub = 8;
+ p.max_height = 2;
+ p.xtiles = 20;
+ p.ytiles = 20;
+ p.tile_usub = 10;
+ p.tile_vsub = 10;
p.num_octaves = 3;
p.noise_freq = 10;
p.coarse_heightmap = 0;
prev_y = y;
if(button[0]) {
- theta += dx;
- phi += dy;
+ theta += dx * 0.5;
+ phi += dy * 0.5;
- if(phi < -90)
- phi = -90;
+ if(phi < 0)
+ phi = 0;
if(phi > 90)
phi = 90;
}
static void display()
{
- camera->set_orbit_params(phi, theta, dist);
+ camera->set_orbit_params(theta, phi, dist);
// gfx_clear(0.76, 0.3, 0.43);
gfx_clear(0.1, 0.1, 0.1);