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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
507
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #include "SceneGraphRoot.h"
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #include "SGList.h"
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 #include "gaplant_action.h"
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #include "back_action.h"
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
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
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 SceneGraphPtr back;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 SceneGraphPtr gaplant;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 sgroot->createFromXMLfile(manager, "xml_file/gap_plane_test.xml");
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 sgroot->createFromXMLfile(manager, "xml_file/Ball.xml");
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 back = sgroot->createSceneGraph();
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 back->set_move_collision(back_move, back_coll);
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 gaplant = sgroot->createSceneGraph();
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 gaplant->xyz[0] = 200;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 gaplant->angle[0] = -60;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 gaplant->angle[1] = 0;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 gaplant->angle[2] = 0;
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 gaplant->set_move_collision(gaplant_move, gaplant_coll);
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 for (int i = arm_L_D; i <= foot_L_A; i++) {
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 SceneGraphPtr p = sgroot->createSceneGraph(i);
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 gaplant->addChild(p);
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 }
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 back->addChild(gaplant);
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
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
735f76483bb2 Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 }