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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? entity.hh

?? 一個機器人平臺
?? HH
字號:
/* *  Stage : a multi-robot simulator. *  Copyright (C) 2001, 2002 Richard Vaughan, Andrew Howard and Brian Gerkey. * *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * *//* * Desc: Base class for movable entities. * Author: Richard Vaughan, Andrew Howard * Date: 04 Dec 2000 * CVS info: $Id: entity.hh,v 1.12.2.2.2.1 2003/12/05 02:08:27 gerkey Exp $ */#ifndef _ENTITY_HH#define _ENTITY_HH#if HAVE_CONFIG_H  #include <config.h>#endif#if HAVE_STDINT_H  #include <stdint.h>#endif#if HAVE_SYS_TYPES_H  #include <sys/types.h>#endif#include "stage1p3.h"#include "stage_types.hh"#include "colors.hh"#include "library.hh"#include <netdb.h>#include <string.h> // for strncpy(3)#include <sys/types.h>#include <netinet/in.h>#ifdef INCLUDE_RTK2#include "rtk.h"#endif//#include "library.hh"//extern Library* lib;// Forward declare the world classclass CWorld;class CWorldFile;///////////////////////////////////////////////////////////////////////////// The basic moveable object classclass CEntity{  // Minimal constructor Requires a pointer to the library entry for  // this type, a pointer to the world, and a parent  public: CEntity( LibraryItem* libit, CWorld *world, CEntity *parent_entity );    // a linked list of other entities attached to this onepublic: CEntity* child_list;public: CEntity* prev;public: CEntity* next;protected:  void AddChild( CEntity* child );  // this is unique for each object, and is equal to its position in  // the world's child listpublic: stage_id_t stage_id;  public: void Print( char* prefix );  // Destructor  public: virtual ~CEntity();  // Load the entity from the worldfile  public: virtual bool Load(CWorldFile *worldfile, int section);    // Save the entity to the worldfile  public: virtual bool Save(CWorldFile *worldfile, int section);    // Initialise entity  public: virtual bool Startup( void );     // Finalize entity  public: virtual void Shutdown();  // Get/set properties  public: virtual int SetProperty( int con,                                   EntityProperty property, void* value, size_t len );  public: virtual int GetProperty( EntityProperty property, void* value );    // Update the entity's device-specific representation  // this is called every time the simulation clock increments  public: virtual void Update( double sim_time );  // this is called very rapidly from the main loop  // it allows the entity to perform some actions between clock increments  // (such handling config requests to increase synchronous IO performance)public: virtual void Sync();  // Render the entity into the world  protected: void Map(double px, double py, double pth);  // Remove the entity from the world  protected: void UnMap();  // Remove the entity at its current pose and remap it at a new pose.  protected: void ReMap(double px, double py, double pth);    // Primitive rendering function using internally  private: void MapEx(double px, double py, double pth, bool render);  // Check to see if the given pose will yield a collision with obstacles.  // Returns a pointer to the first entity we are in collision with.  // Returns NULL if no collisions.  // This function is useful for writing position devices.  protected: virtual CEntity *TestCollision(double px, double py, double pth );    // same; also records the position of the hit  protected: virtual CEntity *TestCollision(double px, double py, double pth,                                             double &hitx, double &hity );  // writes a description of this device into the bufferpublic: virtual void GetStatusString( char* buf, int buflen );    // Convert local to global coords  public: void LocalToGlobal(double &px, double &py, double &pth);  // Convert global to local coords  public: void GlobalToLocal(double &px, double &py, double &pth);  // Set the entitys pose in the parent cs  public: void SetPose(double px, double py, double pth);  // Get the entitys pose in the parent cs  public: void GetPose(double &px, double &py, double &pth);  // Get the entitys pose in the global cs  public: void SetGlobalPose(double px, double py, double pth);  // Get the entitys pose in the global cs  public: void GetGlobalPose(double &px, double &py, double &pth);  // Set the entitys velocity in the global cs  // (I cant be bothered implementing local velocities - AH)  public: void SetGlobalVel(double vx, double vy, double vth);  // Get the entitys velocity in the global cs  // (I cant be bothered implementing local velocities - AH)  public: void GetGlobalVel(double &vx, double &vy, double &vth);  // Get the entity mass  public: double GetMass() { return (this->mass); }public: void GetBoundingBox( double &xmin, double &ymin,			     double &xmax, double &ymax );    // See if the given entity is one of our descendents  //public: bool IsDescendent(CEntity *entity);  // subscribe to / unsubscribe from the device  // these don't do anything by default, but are overridden by CPlayerEntity  public: virtual int Subscribed();public: virtual void Subscribe();public: virtual void Unsubscribe();    // these versions sub/unsub to this device and all its decendantspublic: virtual void FamilySubscribe();public: virtual void FamilyUnsubscribe();  // Pointer to world  public: CWorld *m_world;      // Pointer to parent entity  // i.e. the entity this entity is attached to.  public: CEntity *m_parent_entity;  // Pointer the default entity  // i.e. the entity that would-be children of this entity should attach to.  // This will usually be the entity itself.  private: CEntity *m_default_entity;  // change the parent  public: void SetParent( CEntity* parent );  // get the parent  public: CEntity* GetParent( void ){ return( this->m_parent_entity ); };  // returns true if this object is a child of ancestor, or a child  // of a child of ancestor, etc, recursively.public: bool IsDescendent( CEntity* ancestor );  // The section in the world file that describes this entity  public: int worldfile_section;  // return a pointer to this or a child if it matches the worldfile section  CEntity* FindSectionEntity( int section );      // the worldfile token that caused this entity to be created  // it is set in the constructor (which is called by the library)   //protected: char token[STAGE_TOKEN_MAX];   // this is the library's entry for this device, which contains the  // object's type number, worldfile token, etc.  this can also be  // used as a type identifier, as it is unique for each library entry  LibraryItem* lib_entry;     // Our shape and geometry  public: StageShape shape;  public: double origin_x, origin_y;  public: double size_x, size_y;  // Our color  public: StageColor color;  // Descriptive name for this entity  public: char name[256];  // Entity mass (for collision calculations)  protected: double mass;    // Sensor return values  // Set these appropriately to have this entity 'seen' by  // the relevant sensor.  public: bool obstacle_return;  public: bool puck_return;  public: bool sonar_return;    public: bool vision_return;  public: LaserReturn laser_return;  public: IDARReturn idar_return;  public: GripperReturn gripper_return;  public: int fiducial_return;   // the full path name of this device in the filesystem  //public: char device_filename[256];   // a filedescriptor for this device's file, used for locking  //private: int m_fd;  // flag is set when a dependent device is  attached to this device  public: bool m_dependent_attached;  // Initial pose in local cs (ie relative to parent)  protected: double init_px, init_py, init_pth;    // Pose in local cs (ie relative to parent)  protected: double local_px, local_py, local_pth;  // Velocity in global cs (for coliision calculations)  protected: double vx, vy, vth;  // The last mapped pose in global cs  protected: double map_px, map_py, map_pth;    // how often to update this device, in seconds  // all devices check this before updating their data  // instances can modify this in response to config file or messages  protected: double m_interval;   protected: double m_last_update;  ///////////////////////////////////////////////////////////////////////  // DISTRIBUTED STAGE STUFF  //public: stage_truth_t truth, old_truth;  public: char m_dirty[ MAX_POSE_CONNECTIONS ][ ENTITY_LAST_PROPERTY ];  // set the dirty flag for each property for each connection  public: void SetDirty( char v);  public: void SetDirty( EntityProperty prop, char v );  public: void SetDirty( int con, char v );  public: void SetDirty( int con, EntityProperty prop, char v );    // these store the last pose we sent out from the pose server  // to be tested when setting the dirty flag to see if we really  // need to send a new pose  public: int m_last_pixel_x, m_last_pixel_y, m_last_degree;    // recursive function that ORs an ent's dirty array with those of  // all it's ancestors   public: void InheritDirtyFromParent( int con_count );  // the IP address of the host that manages this entity  // replaced the hostname 'cos it's smaller and faster in comparisons  public: struct in_addr m_hostaddr;  // flag is true iff this entity is updated by this host  public: bool m_local;     // functions for drawing this entity in GUIs#ifdef INCLUDE_RTK2  // Initialise the rtk gui  public: virtual void RtkStartup();  // Finalise the rtk gui  public: virtual void RtkShutdown();  // Update the rtk gui  public: virtual void RtkUpdate();  // Process mouse events  public: virtual void RtkOnMouse(rtk_fig_t *fig, int event, int mode);    // Process mouse events (static callback)  protected: static void StaticRtkOnMouse(rtk_fig_t *fig, int event, int mode);  // Default figure handle  public: rtk_fig_t *fig, *fig_label;  // Default movement mask  protected: int movemask;#endif    // calls the GUI hook to startup this object, then recusively calls  // the children's GuiStartup()  public: virtual void GuiStartup( void );  //#ifdef ENTITY_GUI_DATA_TYPE  // allow the GUI to attach some data to an object if it needs to.  // the GUI library's header file defines this macro to control this  // member's type. if the macro isn't set then there is no valud GUI  // and this member doesn't exist. value is NULLed in the constuctor.  //public: ENTITY_GUI_DATA_TYPE *gui_data;   //#endif  public: void *gui_data; };// macro loops over the children#define CHILDLOOP( ch )\for( CEntity* ch = this->child_list; ch; ch = ch->next )    #endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区日韩精品视频| 亚洲国产日韩在线一区模特| 亚洲一区二区三区美女| 欧美a级理论片| 色偷偷成人一区二区三区91| 欧美不卡在线视频| 亚洲国产视频直播| 成人午夜视频在线观看| 日韩视频一区二区在线观看| 亚洲一区二区三区四区的| 成人午夜免费视频| 欧美v国产在线一区二区三区| 亚洲高清免费观看高清完整版在线观看 | 欧美日韩在线综合| 中文字幕欧美激情| 狠狠色综合播放一区二区| 欧美日韩一区二区欧美激情| 亚洲欧洲日韩在线| 国产91在线|亚洲| 欧美xfplay| 精品一区二区三区日韩| 欧美理论电影在线| 亚洲综合清纯丝袜自拍| 99久久综合国产精品| 久久九九影视网| 国产乱对白刺激视频不卡| 精品入口麻豆88视频| 青青草国产成人99久久| 欧美久久婷婷综合色| 亚洲综合视频网| 欧美怡红院视频| 一区二区三区欧美在线观看| 一本大道久久a久久综合| 国产精品丝袜在线| 91在线云播放| 亚洲黄色av一区| 在线精品国精品国产尤物884a| 日韩美女精品在线| 一本一道久久a久久精品综合蜜臀| 国产精品无人区| 99精品欧美一区| 亚洲综合自拍偷拍| 欧美日韩免费电影| 奇米色一区二区| 国产亚洲精品超碰| 99久久综合99久久综合网站| 亚洲日本中文字幕区| 91久久免费观看| 日韩电影一区二区三区四区| 337p亚洲精品色噜噜噜| 九色综合国产一区二区三区| 欧美mv日韩mv国产网站app| 国产精品888| 亚洲日本一区二区| 欧美伊人久久大香线蕉综合69| 亚洲成av人综合在线观看| 日韩欧美你懂的| 成人av在线一区二区三区| 亚洲精品免费在线| 欧美高清hd18日本| 国产精品自拍av| 亚洲美女视频一区| 日韩写真欧美这视频| 成人免费观看av| 偷拍自拍另类欧美| 国产欧美一区二区精品婷婷| 91碰在线视频| 久久精品72免费观看| 中文字幕一区二区三区不卡| 欧美裸体bbwbbwbbw| 国产精品18久久久久久久久 | 欧美一级精品在线| 国产成人免费视频网站高清观看视频 | 国产欧美一区视频| 色屁屁一区二区| 激情综合网激情| 一区二区三区日韩| 久久人人97超碰com| 精品视频在线免费| 丁香婷婷深情五月亚洲| 日韩精品亚洲一区| 最好看的中文字幕久久| 日韩欧美成人午夜| 欧美性大战久久久久久久蜜臀| 久久精品国产久精国产| 一区二区三区波多野结衣在线观看| 久久综合成人精品亚洲另类欧美| 日本韩国欧美三级| 国产99久久久久| 玖玖九九国产精品| 亚洲r级在线视频| 国产精品久久久久桃色tv| 日韩免费高清av| 精品视频123区在线观看| 成人免费看的视频| 国产精品自拍毛片| 久久av中文字幕片| 同产精品九九九| 亚洲午夜精品网| 亚洲精品视频免费观看| 亚洲国产成人一区二区三区| 精品福利av导航| 欧美一二三区在线| 欧美乱妇20p| 欧美色手机在线观看| 色婷婷av久久久久久久| 99re成人精品视频| 成人免费视频播放| 国产91丝袜在线播放0| 国产一区视频网站| 久久不见久久见免费视频1 | 1区2区3区欧美| 欧美高清在线精品一区| 久久免费电影网| 欧美va亚洲va香蕉在线| 日韩三级在线观看| 欧美成人欧美edvon| 日韩欧美国产成人一区二区| 日韩欧美在线不卡| 日韩免费看的电影| 精品国产99国产精品| 久久奇米777| 国产亚洲一区二区三区在线观看| 国产午夜精品福利| 中文在线资源观看网站视频免费不卡| 国产欧美日韩精品a在线观看| 久久久久久97三级| 欧美激情在线一区二区| 国产精品久久久久9999吃药| 亚洲色图制服丝袜| 亚洲aaa精品| 久久99久久精品| 国产成人自拍网| 99免费精品在线| 欧美亚洲一区二区三区四区| 911国产精品| 久久网站热最新地址| 亚洲欧洲成人精品av97| 亚洲第一久久影院| 久久精品国产精品亚洲精品| 国产一区91精品张津瑜| 丰满放荡岳乱妇91ww| 欧洲精品一区二区三区在线观看| 3d动漫精品啪啪1区2区免费 | 欧美日韩aaa| 亚洲精品在线电影| 亚洲视频在线观看三级| 久久国内精品自在自线400部| 国产成人精品影视| 91成人网在线| 欧美精品一区二区三区久久久 | 亚洲精品国产高清久久伦理二区| 亚洲欧美视频一区| 奇米影视在线99精品| 国产成人福利片| 欧美亚洲国产一区二区三区| 精品国产乱码久久久久久闺蜜| 国产精品日产欧美久久久久| 性欧美疯狂xxxxbbbb| 大尺度一区二区| 欧美精品高清视频| 国产精品久线在线观看| 欧美a级理论片| 91麻豆福利精品推荐| 精品久久久久久久一区二区蜜臀| 最新久久zyz资源站| 国精产品一区一区三区mba桃花| 日本精品视频一区二区| 日韩欧美一二区| 亚洲国产日韩一级| 成人18精品视频| 欧美精品一区二区三区久久久| 伊人夜夜躁av伊人久久| 国产suv精品一区二区6| 日韩欧美亚洲一区二区| 亚洲国产综合人成综合网站| 成人福利在线看| 精品久久久久一区二区国产| 偷拍一区二区三区四区| 91女人视频在线观看| 国产日韩亚洲欧美综合| 蜜臀av亚洲一区中文字幕| 色婷婷香蕉在线一区二区| 国产精品视频一二三区| 国内精品国产三级国产a久久| 欧美精品久久一区| 一区二区三区自拍| 不卡的电视剧免费网站有什么| 精品sm在线观看| 老汉av免费一区二区三区| 3atv在线一区二区三区| 亚洲午夜精品17c| 日韩欧美国产综合| 视频一区在线视频| 欧美日韩精品欧美日韩精品一| 一区二区激情视频| 日本道精品一区二区三区| 亚洲日本欧美天堂| 91在线观看污| 国产精品无遮挡|