代码拉取完成,页面将自动刷新
同步操作将从 NewBee955/SatelliteSimulator 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#ifndef SIMULATION_H
#define SIMULATION_H
#include <vector>
#include <fstream>
#include <sstream>
#include <Satellite.h>
class Simulation
{
public:
Simulation(Planet *planet, const std::string& name, double speed = 1.0, double dt = 1.0);
~Simulation();
void addSatellite(const Satellite& sat);
void remSatellite(int i) {m_satellites->erase(m_satellites->begin()+i);}
Satellite* sat(int i) {return &(m_satellites->at(i));}
unsigned int nsat(void) const {return m_satellites->size();}
void update(void);
double t(void) const {return sim_t;}
void setT(double t) {sim_t = t;}
void reset(void);
void resetAll(void);
double dt(void) const {return sim_dt;}
void setDt(double dt) {sim_dt = dt;}
double speed(void) const {return sim_speed;}
void setSpeed(double speed = 1.0) {sim_speed = speed;}
const std::string& name(void) {return m_name;}
void setWriteLog(bool b) {m_writeLog = b;}
bool writeLog(void) {return m_writeLog;}
bool play(void) const {return m_play;}
void setPlay(bool b) {m_play = b;}
void togglePlay(void) {m_play = !m_play;}
void toggleVerbose(void) {m_verbose = !m_verbose;}
Planet* getPlanet(void) {return m_planet;}
void setName(const std::string& name) {m_name = name;}
const std::string toString(void) const;
int saveToFile(const std::string& path, const std::string &date) const;
private:
Planet* m_planet;
std::string m_name;
std::vector<Satellite>* m_satellites;
double sim_t;
double sim_dt;
double sim_speed;
bool m_play;
bool m_verbose;
bool m_writeLog;
};
#endif // SIMULATION_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。