void TestScene3::runPanda(int argc, char** argv) { // initialize framework PandaFramework framework; framework.open_framework(argc, argv); // open window WindowProperties windowProp; framework.get_default_window_props(windowProp); windowProp.set_size(800, 600); auto window = framework.open_window(windowProp, GraphicsPipe::BF_require_window); // adjust camera auto camera = window->get_camera_group(); camera.set_pos(2000, -2000, 2000); camera.look_at(0, 0, 0); // loop framework.main_loop(); }
void TestScene5::runPanda(int argc, char** argv) { // initialize framework PandaFramework framework; framework.open_framework(argc, argv); // open window WindowProperties windowProp; framework.get_default_window_props(windowProp); windowProp.set_size(800, 600); auto window = framework.open_window(windowProp, GraphicsPipe::BF_require_window); // adjust camera auto camera = window->get_camera_group(); camera.set_pos(2000, -2000, 2000); camera.look_at(LPoint3(0, 0, 0)); // load & integrate model auto model = window->load_model(framework.get_models(), "panda-model"); model.set_pos(-2000, 2000, -2000); model.reparent_to(window->get_render()); // loop framework.main_loop(); }