int main (int argc, char * argv[]) { srand(time(NULL)); srand((unsigned int)time((time_t *)NULL)); printf("Instructions:\n" "Hold down the left mouse button to rotate image: \n" "\n" "Hold 'm' while holding down the right mouse to move the end\n" "Hold 't' while holding down the right mouse to rotate the tangent \n" "\n" "Press 'Esc' to quit\n" ); InitGLUT(argc, argv); InitLights(); InitStuff (); InitThread(argc, argv); glutMainLoop (); }
int main(int argc, char** argv) { // Initialize OpenGL / GLUT InitGLUT(argc, argv); // Initialize Glui2 InitGlui2(); // Start the main rendering loop glutMainLoop(); // Suppress warning return 0; }
void GLUTGame::Run(int argc, char *argv[]) { Log::Write("Game Run Function Invoked...\n", ENGINE_LOG); InitGLUT(argc, argv); InitGL(); InitBASS(); Log::Write("Initializing Game...\n", ENGINE_LOG); Init(); Log::Write("Entering main game loop...\n", ENGINE_LOG); glutMainLoop(); }
int main(int argc, char **argv) { ros::init(argc, argv, "zulumapping"); // Initialize ROS. Node name = zulumapping ros::NodeHandle n; // Handle to this process node // Subscribe to "odom" topic ros::Subscriber odom_sub = n.subscribe("odom", 50, odomCallback); //Subscribe to "base_scan" topic ros::Subscriber base_scan = n.subscribe("base_scan", 50, scanCallback); InitGLUT(); CreateGlutWindow("My GL Window", 800, 600); ros::Rate rate(10); // 10 hz while (true) { ros::spinOnce(); glutMainLoopEvent(); Draw(); rate.sleep(); } return 0; }
int main(int argc, char **argv) { srand( (unsigned)time( NULL ) ); InitGLUT(argc, argv, "Shooter", 500, 500) ; InitDisplay(true, true, false) ; InitCamera(10) ; InitMouse() ; glutDisplayFunc(DisplayHandler) ; glutKeyboardFunc(KeyboardHandler) ; glutMouseFunc(MouseButtonHandler) ; glutMotionFunc(MotionHandler) ; InitOptions() ; glutMainLoop() ; return 0 ; }
int main (int argc, char * argv[]) { //srand(time(NULL)); //srand((unsigned int)time((time_t *)NULL)); printf("Instructions:\n" "Hold down the left mouse button to rotate image: \n" "\n" "Hold 'm' while holding down the right mouse to move the end\n" "Hold 't' while holding down the right mouse to rotate the tangent \n" "\n" "Press 'Esc' to quit\n" ); InitGLUT(argc, argv); InitLights(); InitStuff (); InitThread(argc, argv); signal(SIGINT, &interruptHandler); cout << "Running with CPU Threads = " << NUM_CPU_THREADS << endl; glutMainLoop (); }
int main (int argc, char * argv[]) { srand(time(NULL)); srand((unsigned int)time((time_t *)NULL)); printf("Instructions:\n" "Hold down the left mouse button to rotate image: \n" "\n" "Hold 'm' while holding down the right mouse to move the end\n" "Hold 't' while holding down the right mouse to rotate the tangent \n" "\n" "Press 'Esc' to quit\n" ); InitGLUT(argc, argv); InitLights(); InitStuff (); InitThread(argc, argv); traj_reader_good.read_threads_from_file(); traj_reader_bad.read_threads_from_file(); #ifdef NYLON thread_vision.set_reproj_fix_canny(POINTFILE_NYLON); #elif defined PURPLE thread_vision.set_reproj_fix_canny(POINTFILE_PURPLE); #elif defined BLACK thread_vision.set_reproj_fix_canny(POINTFILE_BLACK); #endif // for (int i=0; i < NUM_PTS; i++) // { // radii[i]=THREAD_RADII; // } // // /* std::cout << (traj_reader.get_all_threads()[0].start_pos() - traj_reader.get_all_threads()[0].end_pos()).norm() << std::endl; std::cout << (traj_reader.get_all_threads()[10].start_pos() - traj_reader.get_all_threads()[10].end_pos()).norm() << std::endl; std::cout << (traj_reader.get_all_threads()[20].start_pos() - traj_reader.get_all_threads()[20].end_pos()).norm() << std::endl; std::cout << (traj_reader.get_all_threads()[30].start_pos() - traj_reader.get_all_threads()[30].end_pos()).norm() << std::endl; std::cout << (traj_reader.get_all_threads()[40].start_pos() - traj_reader.get_all_threads()[40].end_pos()).norm() << std::endl; std::cout << (traj_reader.get_all_threads()[50].start_pos() - traj_reader.get_all_threads()[50].end_pos()).norm() << std::endl; std::cout << (traj_reader.get_all_threads().back().start_pos() - traj_reader.get_all_threads().back().end_pos()).norm() << std::endl; */ if (TRY_ALL) { char filename_errs[256]; #ifdef NYLON sprintf(filename_errs, "%s%s.txt", POINTS_ERR_SAVE_BASE, "nylon"); #elif defined PURPLE sprintf(filename_errs, "%s%s.txt", POINTS_ERR_SAVE_BASE, "purple"); #elif defined BLACK sprintf(filename_errs, "%s%s.txt", POINTS_ERR_SAVE_BASE, "black"); #else sprintf(filename_errs, "%s%s.txt", POINTS_ERR_SAVE_BASE, "notype"); #endif std::ofstream points_err_out; points_err_out.precision(10); points_err_out.open(filename_errs); while (thread_ind < all_threads.size()) { processNormalKeys('v', lastx_R, lasty_R); points_err_out << thread_ind << " " << err_fullopt << " " << err_visiononly << " " << twistAngle_correct << " " <<score_correct_twist << " " << " " << twistAngle_best << " " << score_best_twist << "\n"; points_err_out.flush(); processNormalKeys('s', lastx_R, lasty_R); } points_err_out.close(); exit(0); } glutMainLoop (); }