亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? world.cc

?? 一個機器人平臺
?? CC
?? 第 1 頁 / 共 2 頁
字號:
  m_sim_timeval.tv_sec = (long)floor(m_sim_time);  m_sim_timeval.tv_usec = (long)((m_sim_time-floor(m_sim_time)) * MILLION);   return m_sim_time;}///////////////////////////////////////////////////////////////////////////// Get the sim time// Returns time in sec since simulation starteddouble CWorld::GetTime(){  return m_sim_time;}///////////////////////////////////////////////////////////////////////////// Get the real time// Returns time in sec since simulation starteddouble CWorld::GetRealTime(){  struct timeval tv;  gettimeofday( &tv, NULL );  double time = tv.tv_sec + (tv.tv_usec / 1000000.0);  return time - m_start_time;}///////////////////////////////////////////////////////////////////////////// Set a rectangle in the world gridvoid CWorld::SetRectangle(double px, double py, double pth,                          double dx, double dy, CEntity* ent, bool add){  Rect rect;  dx /= 2.0;  dy /= 2.0;  double cx = dx * cos(pth);  double cy = dy * cos(pth);  double sx = dx * sin(pth);  double sy = dy * sin(pth);      rect.toplx = (int) ((px + cx - sy) * ppm);  rect.toply = (int) ((py + sx + cy) * ppm);  rect.toprx = (int) ((px + cx + sy) * ppm);  rect.topry = (int) ((py + sx - cy) * ppm);  rect.botlx = (int) ((px - cx - sy) * ppm);  rect.botly = (int) ((py - sx + cy) * ppm);  rect.botrx = (int) ((px - cx + sy) * ppm);  rect.botry = (int) ((py - sx - cy) * ppm);      //printf( "draw_rect %d,%d %d,%d %d,%d %d,%d\n",  //  rect.toplx, rect.toply,  //  rect.toprx, rect.topry,  //  rect.botlx, rect.botly,  //  rect.botrx, rect.botry );  matrix->draw_rect( rect, ent, add );}///////////////////////////////////////////////////////////////////////////// Set a circle in the world gridvoid CWorld::SetCircle(double px, double py, double pr, CEntity* ent,                       bool add ){  // Convert from world to image coords  int x = (int) (px * ppm);  int y = (int) (py * ppm);  int r = (int) (pr * ppm);      matrix->draw_circle( x,y,r,ent, add);}///////////////////////////////////////////////////////////////////////////// Add an entity to the array// returns its array index which the entity uses as a unique IDstage_id_t CWorld::RegisterEntity( CEntity* ent ){  // if we have no space left in the array, allocate another chunk  if (this->entity_count >= this->entities_size)    {       this->entities_size += 100; // a good chunk - one realloc will do for most people      this->entities = (CEntity**)	realloc(this->entities, this->entities_size * sizeof(this->entities[0]));    }    stage_id_t id = entity_count++; // record the id BEFORE incrementing it    this->entities[id] = ent; // store the pointer    return id; // return the unique id/index}// return the entity with matching id/index, or NULL if no matchCEntity* CWorld::GetEntity( int id ){   // bounds check  if( id < 0 || id >= this->entity_count )    return NULL;    return( this->entities[id] );}// returns true if the given hostname matches our hostname, false otherwise//  bool CWorld::CheckHostname(char* host)//  {//    //printf( "checking %s against (%s and %s) ", //    //  host, m_hostname, m_hostname_short ); //    if(!strcmp(m_hostname,host) || !strcmp(m_hostname_short,host))//    {//      //PRINT_DEBUG( "TRUE" );//      return true;//    }//    else//    {//      //PRINT_DEBUG( "FALSE" );//      return false;//    }//  }void CWorld::Output(){  // comms used  static unsigned long last_input = 0;  static unsigned long last_output = 0;  unsigned int bytes_in = g_bytes_input - last_input;  unsigned int bytes_out = g_bytes_output - last_output;  static int bytes_accumulator = 0;    // count the data  bytes_accumulator += bytes_in + bytes_out;  // measure frequency & bandwidth  static double freq = 0.0;  static double bandw = 0.0;  static int updates = 0;  static double lasttime = GetRealTime();  double interval = GetRealTime() - lasttime;  // count this update  updates++;    if( interval > 2.0 ) // measure freq + bandwidth every 2 seconds    {      lasttime += interval;      bandw = (double)bytes_accumulator / interval;      bytes_accumulator = 0;            freq = (double)updates / interval;      updates = 0;        }    if( m_console_output )    ConsoleOutput( freq, bytes_in, bytes_out, bandw );      if( m_log_output )     LogOutput( freq, bytes_in, bytes_out, g_bytes_input, g_bytes_output );    last_input = g_bytes_input;  last_output = g_bytes_output; }void CWorld::ConsoleOutput( double freq, 			    unsigned int bytes_in, unsigned int bytes_out,			    double avg_data){  char lineend = '\r';  //char lineend = '\n';  printf( " Step: %u Time: %8.1f - %7.1fHz - [%4u/%4u] %8.2f b/sec%c", 	  m_step_num,	  m_sim_time,           freq,	  bytes_in, bytes_out,           avg_data,	  lineend );    fflush( stdout );  }bool CWorld::Load( void ){  ///////////////////////////////////////////////////////////////////////  // LOAD THE CONFIGURATION FOR THE GUI   // we call this *after* the world has loaded, so we can configure the menus  // correctly  PRINT_DEBUG( "WORLD LOAD" );  if(this->enable_gui ) GuiLoad( this );  else    PRINT_DEBUG( "NOT LOADING GUI" );    return true; // success}bool CWorld::Save( ){  if( this->enable_gui ) GuiSave( this );  return true; // success}void CWorld::LogOutput( double freq,			unsigned int bytes_in, unsigned int bytes_out, 			unsigned int total_bytes_in, 			unsigned int total_bytes_out ){    assert( m_log_fd > 0 );    char line[512];  sprintf( line,           "%u\t\t%.3f\t\t%u\t%u\t%u\t%u\n",            m_step_num, m_sim_time, // step and time           //loop_duration, // real cycle time in ms           //sleep_duration, // real sleep time in ms           //m_sim_timestep / sleep_duration, // ratio           bytes_in, // bytes in this cycle           bytes_out, // bytes out this cycle           total_bytes_in,  // total bytes in           total_bytes_out); // total bytes out    write( m_log_fd, line, strlen(line) );}void CWorld::LogOutputHeader( void )  {  int log_instance = 0;  while( m_log_fd < 0 )    {      char fname[256];      sprintf( fname, "%s.%d", m_log_filename, log_instance++ );      m_log_fd = open( fname, O_CREAT | O_EXCL | O_WRONLY, 		       S_IREAD | S_IWRITE );    }  struct timeval t;  gettimeofday( &t, 0 );        // count the locally managed entities  int m=0;        char* tmstr = ctime((const time_t*)&t.tv_sec);  tmstr[ strlen(tmstr)-1 ] = 0; // delete the newline        char line[512];  sprintf( line,           "# Stage output log\n#\n"           "# Command:\t%s\n"           "# Date:\t\t%s\n"           "# Host:\t\t%s\n"           //"# Bitmap:\t%s\n"           "# Timestep(ms):\t%d\n"           "# Entities:\t%d of %d\n#\n"           "#STEP\t\tSIMTIME(s)"	   //"\tINTERVAL(s)\tSLEEP(s)\tRATIO\t"           "\tINPUT\tOUTPUT\tITOTAL\tOTOTAL\n",           m_cmdline,            tmstr,            m_hostname,            //worldfilename,           (int)(m_sim_timestep * 1000.0),           m,            this->entity_count );        write( m_log_fd, line, strlen(line) );}// return the entity nearest the specified point, but not more than range m away,// that has the specified parent CEntity* CWorld::GetNearestChildWithinRange( double x, double y, double range, 					     CEntity* parent ){  //printf( "Searching from %.2f,%.2f for children of %p\n", x, y, parent );  CEntity* nearest = NULL;    double px, py, pth;  double d;  for( int c=0; c<this->entity_count; c++ )    {      CEntity* ent = this->entities[c];            // we can only select items with root a parent      if( ent->m_parent_entity != parent )	continue;            ent->GetGlobalPose( px, py, pth );            d = hypot( py - y, px - x );            //printf( "Entity type %s is %.2fm away at  %.2f,%.2f\n",       //      ent->GetToken(), d, px, py );            if( d < range )	{	  range = d;	  nearest = ent;	}    }    //if( nearest )  //printf ( "Nearest is type %s\n", nearest->GetToken() );  //else  //puts( "no entity within range" );  return nearest;}// return the entity nearest the specified point, but not more than range m away,// that has the specified parent CEntity* CWorld::GetNearestEntityWithinRange( double x, double y, double range )		{  CEntity* nearest = NULL;  double px, py, pth;  double d;    for( int c=0; c<this->entity_count; c++ )    {      CEntity* ent = this->entities[c];            ent->GetGlobalPose( px, py, pth );            d = hypot( py - y, px - x );            //printf( "Entity type %s is %.2fm away at  %.2f,%.2f\n",       //      ent->token, d, px, py );            if( d < range )	{	  range = d;	  nearest = ent;	}    }    if( nearest )    printf ( "Nearest is %s\n", nearest->lib_entry->token );  else    puts( "no entity within range" );    return nearest;}///////////////////////////////////////////////////////////////////////////// lock the shared mem//bool CWorld::LockByte( int offset ){  return true; // success}///////////////////////////////////////////////////////////////////////////// unlock the shared mem//bool CWorld::UnlockByte( int offset ){  return true; // success}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美va亚洲va香蕉在线| 欧美一区二区三区影视| 777xxx欧美| 中文字幕+乱码+中文字幕一区| 亚洲一区二区在线观看视频| 国产精品456露脸| 欧美一区二区视频在线观看| 天堂影院一区二区| 色婷婷激情一区二区三区| 久久精品人人爽人人爽| 免费观看成人鲁鲁鲁鲁鲁视频| 色爱区综合激月婷婷| 国产精品久久看| 色乱码一区二区三区88| 亚洲自拍偷拍图区| 91精品国产91久久久久久一区二区 | 国产黄色91视频| 亚洲精品一区二区三区四区高清| 亚洲一区二区三区中文字幕在线| 欧美日韩一级二级三级| 一区二区激情视频| 色8久久精品久久久久久蜜| 爽好多水快深点欧美视频| 日韩一区二区三区三四区视频在线观看| 亚洲免费观看高清完整版在线观看熊 | 在线视频你懂得一区| 中文字幕亚洲欧美在线不卡| 国产寡妇亲子伦一区二区| 成人免费在线观看入口| 欧美一区二区三区免费| 国产91富婆露脸刺激对白| 久久久久久久久久电影| 国产精品88av| 亚洲一本大道在线| 精品视频在线视频| 国产很黄免费观看久久| 亚洲风情在线资源站| 亚洲国产精品国自产拍av| 91麻豆精品国产91久久久久久| 粗大黑人巨茎大战欧美成人| 中文字幕一区二区三| 91精品国产乱码久久蜜臀| 99国产精品久久久久| 一区二区三区视频在线看| 久久亚洲免费视频| 91麻豆国产福利精品| 亚洲成av人片一区二区三区| 欧美一级高清大全免费观看| 97精品国产露脸对白| 国产主播一区二区三区| 1024国产精品| 国产亚洲一区二区三区四区| 欧美一区二区在线播放| 在线一区二区三区四区| 国产69精品一区二区亚洲孕妇 | 蜜臀国产一区二区三区在线播放| 欧美mv和日韩mv的网站| 精品视频123区在线观看| 色综合欧美在线视频区| 成人污污视频在线观看| 韩国欧美国产一区| 日韩av电影一区| 国产欧美中文在线| 欧美色精品在线视频| 色综合久久天天| caoporen国产精品视频| 香蕉成人啪国产精品视频综合网 | 2023国产精品自拍| 日韩三级免费观看| 欧美一区二区三区婷婷月色 | 国产69精品久久777的优势| 激情深爱一区二区| 国产中文一区二区三区| 激情文学综合丁香| 国产一区二区三区不卡在线观看 | 看片的网站亚洲| 日韩一区欧美小说| 国产精品五月天| 日韩丝袜情趣美女图片| 日韩一区二区在线看片| 精品三级在线看| 国产亚洲福利社区一区| 国产精品沙发午睡系列990531| 中文字幕免费在线观看视频一区| 国产日韩av一区二区| 国产精品久久综合| 亚洲精品v日韩精品| 国产亚洲婷婷免费| 欧美极品另类videosde| 国产欧美日韩在线| 久久九九久精品国产免费直播| 国产午夜三级一区二区三| 国产精品区一区二区三区| 亚洲视频网在线直播| 久久一二三国产| 久久精品亚洲精品国产欧美kt∨ | 国产精品色在线| 亚洲精品日日夜夜| 天堂成人免费av电影一区| 麻豆精品一区二区三区| 粉嫩在线一区二区三区视频| 91麻豆免费观看| 欧美日韩免费观看一区二区三区| 国产美女av一区二区三区| 日韩欧美一区二区久久婷婷| 成人aaaa免费全部观看| 国产成人在线色| 91免费看片在线观看| 在线观看91av| 欧美精品tushy高清| 精品国产一区二区亚洲人成毛片| 国产精品视频免费看| 亚洲午夜久久久久久久久电影院 | 99国产欧美另类久久久精品 | 日韩限制级电影在线观看| 国产日韩欧美不卡| 婷婷久久综合九色综合绿巨人| 一级特黄大欧美久久久| 蜜臀av性久久久久蜜臀aⅴ| 国产福利精品一区二区| 欧美日韩一区小说| 久久午夜色播影院免费高清| 亚洲精品乱码久久久久久日本蜜臀| 天天色综合成人网| jlzzjlzz亚洲日本少妇| 日韩欧美一区中文| 亚洲欧美日韩一区| 久久99精品久久久| 九九九精品视频| 色妞www精品视频| 久久伊人蜜桃av一区二区| 一区二区三区日韩精品视频| 久久精品国产免费看久久精品| 色综合色综合色综合| 久久亚洲精精品中文字幕早川悠里| 亚洲最大成人网4388xx| 国产激情一区二区三区四区| 欧美美女黄视频| 综合久久给合久久狠狠狠97色 | 高清日韩电视剧大全免费| 欧美人伦禁忌dvd放荡欲情| 国产精品视频一二三区| 九一九一国产精品| 91麻豆精品国产91久久久使用方法 | 亚洲成人tv网| 色综合久久久久久久久| 中文字幕欧美三区| 国产乱码精品1区2区3区| 欧美精品 日韩| 亚洲高清视频中文字幕| 一本到高清视频免费精品| 欧美激情一区在线观看| 国产一区二区三区黄视频| 日韩午夜电影av| 热久久久久久久| 欧美精品欧美精品系列| 亚洲小说春色综合另类电影| av在线综合网| 国产精品卡一卡二| 成人免费高清在线| 国产欧美1区2区3区| 国内精品视频666| www一区二区| 精品一二线国产| 亚洲精品在线三区| 狠狠色狠狠色合久久伊人| 日韩久久久久久| 毛片av一区二区三区| 日韩欧美一二三区| 国内成+人亚洲+欧美+综合在线| 日韩三级伦理片妻子的秘密按摩| 奇米色777欧美一区二区| 日韩小视频在线观看专区| 极品少妇一区二区三区精品视频| 日韩区在线观看| 极品尤物av久久免费看| 国产三级一区二区| 成人激情免费电影网址| 最近中文字幕一区二区三区| 99精品欧美一区二区蜜桃免费| 亚洲欧美aⅴ...| 欧美视频中文一区二区三区在线观看| 国产日产亚洲精品系列| 成人精品电影在线观看| 亚洲人成网站精品片在线观看| 色狠狠色噜噜噜综合网| 五月激情综合婷婷| 日韩精品一区二区三区swag| 国产精品夜夜嗨| 亚洲视频精选在线| 欧美日韩亚洲高清一区二区| 麻豆一区二区三| 国产欧美一区二区在线| 91视频一区二区三区| 天天色综合天天| 国产欧美一区二区三区网站| 一本大道久久a久久综合婷婷| 亚洲h在线观看| 久久精品亚洲乱码伦伦中文| 成人91在线观看|