comparison Renderer/Engine/SceneGraphRoot.cc @ 597:1bfa45a08fa7 draft

add Light Object
author yutaka@henri.cr.ie.u-ryukyu.ac.jp
date Thu, 05 Nov 2009 20:17:59 +0900
parents 7e33deb9d3f4
children 7a311860a76e
comparison
equal deleted inserted replaced
596:f1c2e11a2ef4 597:1bfa45a08fa7
23 // SGLIST_LENGTH 決め打ちかぁ、動的生成にする場合上限決めておいた方がいいのかな 23 // SGLIST_LENGTH 決め打ちかぁ、動的生成にする場合上限決めておいた方がいいのかな
24 // 24 //
25 sg_src = (SceneGraphPtr*) malloc(sizeof(SceneGraphPtr)*SGLIST_LENGTH); 25 sg_src = (SceneGraphPtr*) malloc(sizeof(SceneGraphPtr)*SGLIST_LENGTH);
26 26
27 camera = new Camera(w, h); 27 camera = new Camera(w, h);
28 light = new Light(w, h);
28 iterator = new SceneGraphIterator; 29 iterator = new SceneGraphIterator;
29 controller = create_controller(); 30 controller = create_controller();
30 31
31 sg_exec_tree = NULL; 32 sg_exec_tree = NULL;
32 sg_draw_tree = NULL; 33 sg_draw_tree = NULL;
61 cnt--; 62 cnt--;
62 } 63 }
63 64
64 free(sg_src); 65 free(sg_src);
65 delete camera; 66 delete camera;
67 delete light;
66 delete iterator; 68 delete iterator;
67 delete controller; 69 delete controller;
68 } 70 }
69 71
70 /** 72 /**
525 CameraPtr 527 CameraPtr
526 SceneGraphRoot::getCamera() 528 SceneGraphRoot::getCamera()
527 { 529 {
528 return camera; 530 return camera;
529 } 531 }
532
533 LightPtr
534 SceneGraphRoot::getLight()
535 {
536
537 return light;
538
539 }