507
|
1 #include "SceneGraphRoot.h"
|
|
2 #include "SGList.h"
|
|
3 #include "gaplant_action.h"
|
|
4 #include "back_action.h"
|
|
5
|
|
6 void
|
|
7 init_gaplant(TaskManager *manager, int w, int h)
|
|
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);
|
|
30 }
|