Mercurial > hg > Members > kono > Cerium
annotate Renderer/Test/title.cc @ 895:bed529c55eda
add alignment of classes in SPU
width and height are automatically set in frame buffer API
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 16 Jul 2010 17:23:49 +0900 |
parents | d0b8860c17f8 |
children |
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 | |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
563
diff
changeset
|
7 title_collision(SceneGraphPtr node, void *sgroot_, int w, int h,SceneGraphPtr tree) |
507 | 8 { |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
563
diff
changeset
|
9 SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_; |
507 | 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 | |
656
d0b8860c17f8
remove global variable "sgroot" , add SgChange.{cc, h} SgMain.cc SgRootChange.{cc, h}
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
563
diff
changeset
|
24 add_cubecollision_object(redcube,vacuum,w,h, sgroot); |
507 | 25 |
26 sgroot->setSceneData(back); | |
27 | |
28 } | |
29 } |