Mercurial > hg > Members > kono > Cerium
comparison Renderer/Test/back_action.cc @ 656:d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
author | hiroki@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Wed, 25 Nov 2009 21:56:14 +0900 |
parents | a068627a0bc6 |
children |
comparison
equal
deleted
inserted
replaced
646:ffcc25c7c566 | 656:d0b8860c17f8 |
---|---|
2 #include "SceneGraphRoot.h" | 2 #include "SceneGraphRoot.h" |
3 #include "ball_action.h" | 3 #include "ball_action.h" |
4 using namespace std; | 4 using namespace std; |
5 | 5 |
6 void | 6 void |
7 back_move(SceneGraphPtr node, int w, int h) | 7 back_move(SceneGraphPtr node, void *sgroot_, int w, int h) |
8 { | 8 { |
9 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; | |
9 Pad *pad = sgroot->getController(); | 10 Pad *pad = sgroot->getController(); |
10 | 11 |
11 if (pad->triangle.isPush()) { | 12 if (pad->triangle.isPush()) { |
12 SceneGraphPtr ball = sgroot->createSceneGraph("Ball"); | 13 SceneGraphPtr ball = sgroot->createSceneGraph("Ball"); |
13 ball->xyz[0] = -100; | 14 ball->xyz[0] = -100; |
15 node->addChild(ball); | 16 node->addChild(ball); |
16 } | 17 } |
17 } | 18 } |
18 | 19 |
19 void | 20 void |
20 back_coll(SceneGraphPtr node, int w, int h, SceneGraphPtr tree) | 21 back_coll(SceneGraphPtr node, void *sgroot_, int w, int h, SceneGraphPtr tree) |
21 { | 22 { |
22 | 23 |
23 } | 24 } |