1 Star 1 Fork 22

zhjun5337 / air_plane

forked from zhouxiang / air_plane 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
flypath.h 671 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhouxiang 提交于 2013-09-16 19:39 . modefy
#ifndef FLYPATH_H
#define FLYPATH_H
/**
* @brief The FlyPath class 飞行轨迹,f(x,y)函数
*/
class FlyPath
{
public:
FlyPath() {}
virtual ~FlyPath() = 0;
private:
};
FlayPath::~FlyPath()
{
}
/**
* @brief The BulletFlyPath class 子弹飞行的轨迹,实例,可以在autofly中直接编写控制轨迹代码,也可以继承FlayPath实现轨迹逻辑,供使用
*/
class BulletFlyPath : public FlyPath
{
public:
BulletFlyPath(double y):m_y(y) {}
virtual ~BulletFlyPath(){}
virtual double operator()(double x);
private:
double m_y;
};
double BulletFlyPath::operator ()(double /*x*/)
{
return m_y++;
}
#endif // FLYPATH_H
1
https://gitee.com/zhjun5337/air_plane.git
git@gitee.com:zhjun5337/air_plane.git
zhjun5337
air_plane
air_plane
master

搜索帮助