ccdemos/realtime_dragon.cc
branchpyrit
changeset 71 4fedf7290929
parent 69 303583d2fb97
child 72 7c3f38dff082
equal deleted inserted replaced
70:4b84e90325c5 71:4fedf7290929
     1 #include "raytracer.h"
     1 #include "raytracer.h"
     2 #include "octree.h"
     2 #include "kdtree.h"
     3 
     3 
     4 #include "common_sdl.h"
     4 #include "common_sdl.h"
     5 #include "common_ply.h"
     5 #include "common_ply.h"
     6 
     6 
     7 int main(int argc, char **argv)
     7 int main(int argc, char **argv)
     8 {
     8 {
     9 	Raytracer rt;
     9 	Raytracer rt;
    10 	Octree top;
    10 	KdTree top;
    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 
    28 	rt.setCamera(&cam);
    28 	rt.setCamera(&cam);
    29 	cam.setEye(Vector3(0,0,10));
    29 	cam.setEye(Vector3(0,0,10));
    30 
    30 
    31 	top.optimize();
    31 	top.optimize();
    32 
    32 
       
    33 	if (argc == 2 && strcmp(argv[1], "-buildonly") == 0)
       
    34 		return 0;
       
    35 
    33 	loop_sdl(rt, cam);
    36 	loop_sdl(rt, cam);
    34 }
    37 }