Mercurial > hg > Members > kono > Cerium
view Renderer/Test/gaplant.cc @ 562:a5fda4e51498
name search
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Oct 2009 22:22:31 +0900 |
parents | 1a2f015c42b2 |
children | 306c9a7717c3 |
line wrap: on
line source
#include "SceneGraphRoot.h" #include "gaplant_action.h" #include "gaplant.h" #include "back_action.h" MainLoopPtr gaplant::init(Viewer *sgroot, int w, int h) { SceneGraphPtr back; SceneGraphPtr gaplant; sgroot->createFromXMLfile("xml_file/gap_plane_test.xml"); sgroot->createFromXMLfile("xml_file/Ball.xml"); back = sgroot->createSceneGraph(); back->set_move_collision(back_move, back_coll); gaplant = sgroot->createSceneGraph(); gaplant->xyz[0] = 200; gaplant->angle[0] = -60; gaplant->angle[1] = 0; gaplant->angle[2] = 0; gaplant->set_move_collision(gaplant_move, gaplant_coll); int foot = sgroot->getSgid("foot_L_A"); for (int i = sgroot->getSgid("arm_L_D"); i <= foot; i++) { SceneGraphPtr p = sgroot->createSceneGraph(i); gaplant->addChild(p); } back->addChild(gaplant); sgroot->setSceneData(back); return sgroot; } extern Application * application() { return new gaplant(); } const char *usr_help_str = "Usage: ./test_nogl [OPTION]\n"; extern int init(TaskManager *manager, int argc, char *argv[]); extern void task_initialize(); static void TMend(TaskManager *manager); int TMmain(TaskManager *manager, int argc, char *argv[]) { task_initialize(); manager->set_TMend(TMend); return init(manager, argc, argv); } void TMend(TaskManager *manager) { printf("test_nogl end\n"); } /* end */