📄 tree.h
字号:
//// pedsim - A microscopic pedestrian simulation system. // Copyright (c) 2003 - 2004 by Christian Gloor// // You can redistribute and/or modify this program under the terms of// the GNU General Public License. See copying.txt for details.// #include <iostream>#include <vector>class Ttree { public: // agents should have access to this. protected??? int id; double x,y; double vx,vy; int type; double energy; bool dead; double color; double size; double rotation; public: Ttree(); void move(); void setPosition(double px, double py) {x = px, y = py; }; void setType(int t) {type = t; }; int getid() { return id; }; int gettype() { return type; }; double getx() { return x; }; double gety() { return y; }; double getcolor() { return color; }; double getsize() { return size; }; double getrotation() { return rotation; }; bool isalive() { return !dead; }; void hit(); void print() {std::cout << "tree " << id << ": " << x << "/" << y << std::endl; };};#define TreeContainer std::vector<Ttree>#define TreeIterator std::vector<Ttree>::iterator
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -