ccdemos/realtime_bunny.cc
branchpyrit
changeset 91 9d66d323c354
parent 85 907a634e5c02
child 92 9af5c039b678
equal deleted inserted replaced
90:f6a72eb99631 91:9d66d323c354
    11 	Camera cam;
    11 	Camera cam;
    12 
    12 
    13 	rt.setMaxDepth(0);
    13 	rt.setMaxDepth(0);
    14 	rt.setTop(&top);
    14 	rt.setTop(&top);
    15 
    15 
    16 	Light light1(Vector3(-5.0, 2.0, 8.0), Colour(0.9, 0.3, 0.6));
    16 	Light light1(Vector(-5.0, 2.0, 8.0), Colour(0.9, 0.3, 0.6));
    17 	light1.castShadows(false);
    17 	light1.castShadows(false);
    18 	rt.addLight(&light1);
    18 	rt.addLight(&light1);
    19 
    19 
    20 	//Light light2(Vector3(-2.0, 10.0, 2.0), Colour(0.4, 0.6, 0.3));
    20 	//Light light2(Vector(-2.0, 10.0, 2.0), Colour(0.4, 0.6, 0.3));
    21 	//light2.castShadows(false);
    21 	//light2.castShadows(false);
    22 	//rt.addLight(&light2);
    22 	//rt.addLight(&light2);
    23 
    23 
    24 	Material mat(Colour(0.9, 0.9, 0.9));
    24 	Material mat(Colour(0.9, 0.9, 0.9));
    25 	mat.setSmooth(true);
    25 	mat.setSmooth(true);
    26 	load_ply(rt, "../models/ply/bunny/bun_zipper.ply", &mat, Vector3(-29,29,29), Vector3(-1,-3,0));
    26 	load_ply(rt, "../models/ply/bunny/bun_zipper.ply", &mat, Vector(-29,29,29), Vector(-1,-3,0));
    27 
    27 
    28 	rt.setCamera(&cam);
    28 	rt.setCamera(&cam);
    29 	cam.setEye(Vector3(0,0,10));
    29 	cam.setEye(Vector(0,0,10));
    30 
    30 
    31 	top.optimize();
    31 	top.optimize();
    32 
    32 
    33 	loop_sdl(rt, cam);
    33 	loop_sdl(rt, cam);
    34 }
    34 }