diff 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
line wrap: on
line diff
--- a/Renderer/Test/SgRootChange.cc	Tue Dec 08 16:52:04 2009 +0900
+++ b/Renderer/Test/SgRootChange.cc	Tue Dec 08 19:44:20 2009 +0900
@@ -4,6 +4,19 @@
 #include "MainLoop.h"
 #include "SgRootChange.h"
 
+static void
+ball_move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h)
+{
+    printf("test\n");
+}
+
+static void
+ball_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h,
+			   SceneGraphPtr tree)
+{
+    printf("collision\n");
+}
+
 // prototype
 MainLoopPtr 
 SgRootChange::init(Viewer *sgroot, int screen_w, int screen_h)
@@ -17,6 +30,7 @@
     SceneGraphPtr ball;
     sgroot->createFromXMLfile("xml_file/Ball.xml");
     ball = sgroot->createSceneGraph("Ball");
+    ball->set_move_collision(ball_move, ball_collision);
     sgroot->setSceneData(ball);
 
     return sgroot;