comparison Renderer/Test/SgRootChange.cc @ 693:fc0227b5cb5a

debug , aligned light_xyz
author hiroki@localhost.localdomain
date Tue, 08 Dec 2009 19:44:20 +0900
parents 9d1bcc07734b
children aaaa0baeab89
comparison
equal deleted inserted replaced
692:50750b118116 693:fc0227b5cb5a
1 #include <math.h> 1 #include <math.h>
2 #include <stdlib.h> 2 #include <stdlib.h>
3 #include "SceneGraphRoot.h" 3 #include "SceneGraphRoot.h"
4 #include "MainLoop.h" 4 #include "MainLoop.h"
5 #include "SgRootChange.h" 5 #include "SgRootChange.h"
6
7 static void
8 ball_move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
9 {
10 printf("test\n");
11 }
12
13 static void
14 ball_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h,
15 SceneGraphPtr tree)
16 {
17 printf("collision\n");
18 }
6 19
7 // prototype 20 // prototype
8 MainLoopPtr 21 MainLoopPtr
9 SgRootChange::init(Viewer *sgroot, int screen_w, int screen_h) 22 SgRootChange::init(Viewer *sgroot, int screen_w, int screen_h)
10 { 23 {
15 SgRootChange::init_only_sg(SgChange *sgroot, int screen_w, int screen_h) 28 SgRootChange::init_only_sg(SgChange *sgroot, int screen_w, int screen_h)
16 { 29 {
17 SceneGraphPtr ball; 30 SceneGraphPtr ball;
18 sgroot->createFromXMLfile("xml_file/Ball.xml"); 31 sgroot->createFromXMLfile("xml_file/Ball.xml");
19 ball = sgroot->createSceneGraph("Ball"); 32 ball = sgroot->createSceneGraph("Ball");
33 ball->set_move_collision(ball_move, ball_collision);
20 sgroot->setSceneData(ball); 34 sgroot->setSceneData(ball);
21 35
22 return sgroot; 36 return sgroot;
23 } 37 }
24 38