?? bitmap.hh
字號:
/////////////////////////////////////////////////////////////////////////////// File: bitmap.hh// Author: Andrew Howard// Date: 29 Dec 2001// Desc: Simulates fixed obstacles//// CVS info:// $Source: /cvsroot/playerstage/code/stage/src/models/Attic/bitmap.hh,v $// $Author: rtv $// $Revision: 1.2 $/////////////////////////////////////////////////////////////////////////////#ifndef BITMAP_HH#define BITMAP_HH#include <vector>#include "entity.hh"// Some forward declarationsclass Nimage;typedef struct{ double x, y, w, h;} bitmap_rectangle_t;class CBitmap : public CEntity{ // Default constructor public: CBitmap( LibraryItem *libit, CWorld *world, CEntity *parent); // a static named constructor - a pointer to this function is given // to the Library object and paired with a string. When the string // is seen in the worldfile, this function is called to create an // instance of this entity public: static CBitmap* Creator( LibraryItem *libit, CWorld *world, CEntity *parent ) { return( new CBitmap( libit, world, parent ) ); } // Load the entity from the worldfile public: virtual bool Load(CWorldFile *worldfile, int section); // Initialise object public: virtual bool Startup( void ); // Finalize object public: virtual void Shutdown(); // Name of file containg image private: const char *filename; // Scale of the image (m/pixel) public: double scale; // Crop region (m) private: double crop_ax, crop_ay, crop_bx, crop_by; // The image representing the environment public: Nimage *image; std::vector<bitmap_rectangle_t> bitmap_rects;#ifdef INCLUDE_RTK2 void RtkStartup(); void BuildQuadTree( uint8_t color, int x1, int y1, int x2, int y2 );#endif};#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -