Mercurial > hg > Members > kono > Cerium
annotate Renderer/Test/gaplant.cc @ 557:ec72b601b71f
fix examlples (on going)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Oct 2009 17:34:12 +0900 |
parents | f6daf964f483 |
children | 1a2f015c42b2 |
rev | line source |
---|---|
507 | 1 #include "SceneGraphRoot.h" |
2 #include "SGList.h" | |
3 #include "gaplant_action.h" | |
4 #include "back_action.h" | |
5 | |
557
ec72b601b71f
fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
508
diff
changeset
|
6 MainLoopPtr |
ec72b601b71f
fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
508
diff
changeset
|
7 gaplant::init_gaplant(Viewer *sgroot, int w, int h) |
507 | 8 { |
9 SceneGraphPtr back; | |
10 SceneGraphPtr gaplant; | |
11 sgroot->createFromXMLfile(manager, "xml_file/gap_plane_test.xml"); | |
12 sgroot->createFromXMLfile(manager, "xml_file/Ball.xml"); | |
13 | |
14 back = sgroot->createSceneGraph(); | |
15 back->set_move_collision(back_move, back_coll); | |
16 gaplant = sgroot->createSceneGraph(); | |
17 gaplant->xyz[0] = 200; | |
18 gaplant->angle[0] = -60; | |
19 gaplant->angle[1] = 0; | |
20 gaplant->angle[2] = 0; | |
21 gaplant->set_move_collision(gaplant_move, gaplant_coll); | |
22 | |
23 for (int i = arm_L_D; i <= foot_L_A; i++) { | |
24 SceneGraphPtr p = sgroot->createSceneGraph(i); | |
25 gaplant->addChild(p); | |
26 } | |
27 | |
28 back->addChild(gaplant); | |
29 sgroot->setSceneData(back); | |
557
ec72b601b71f
fix examlples (on going)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
508
diff
changeset
|
30 return sgroot; |
507 | 31 } |