Mercurial > hg > Members > kono > Cerium
annotate Renderer/Test/title.cc @ 566:006c4e9e6acb
merge
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Oct 2009 23:49:34 +0900 |
parents | b21a013051a2 |
children | d0b8860c17f8 |
rev | line source |
---|---|
507 | 1 #include "SceneGraphRoot.h" |
2 #include "vacuum.h" | |
563
b21a013051a2
all exmple on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
508
diff
changeset
|
3 |
b21a013051a2
all exmple on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
508
diff
changeset
|
4 extern int redcube; |
507 | 5 |
6 void | |
7 title_collision(SceneGraphPtr node, int w, int h,SceneGraphPtr tree) | |
8 { | |
9 | |
10 Pad *pad = sgroot->getController(); | |
11 | |
12 if(pad->start.isPush()) { | |
13 | |
14 SceneGraphPtr vacuum; | |
15 SceneGraphPtr back = sgroot->createSceneGraph(); | |
16 | |
563
b21a013051a2
all exmple on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
508
diff
changeset
|
17 vacuum = sgroot->createSceneGraph("BIGCUBE"); |
507 | 18 vacuum->xyz[0] = w/2; |
19 vacuum->xyz[1] = h*0.8; | |
20 vacuum->set_move_collision(vacuum_move, vacuum_coll); | |
21 | |
22 back->addChild(vacuum); | |
23 | |
563
b21a013051a2
all exmple on Mac OS X
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
508
diff
changeset
|
24 add_cubecollision_object(redcube,vacuum,w,h); |
507 | 25 |
26 sgroot->setSceneData(back); | |
27 | |
28 } | |
29 } |