Fetch the repository succeeded.
#ifndef ATG_ENGINE_CONNECTING_ROD_H
#define ATG_ENGINE_CONNECTING_ROD_H
#include "part.h"
#include "crankshaft.h"
class Piston;
class ConnectingRod : public Part {
public:
struct Parameters {
double mass = 0.0;
double momentOfInertia = 0.0;
double centerOfMass = 0.0;
double length = 0.0;
int rodJournals = 0;
double slaveThrow = 0;
Piston *piston = nullptr;
Crankshaft *crankshaft = nullptr;
ConnectingRod *master = nullptr;
int journal = 0;
};
public:
ConnectingRod();
virtual ~ConnectingRod();
void initialize(const Parameters ¶ms);
double getBigEndLocal() const;
double getLittleEndLocal() const;
void setMaster(ConnectingRod *rod) { m_master = rod; }
void setCrankshaft(Crankshaft *crank) { m_crankshaft = crank; }
inline int getRodJournalCount() const { return m_rodJournalCount; }
void setRodJournalAngle(int i, double angle);
void getRodJournalPositionLocal(int i, double *x, double *y);
void getRodJournalPositionGlobal(int i, double *x, double *y);
double getRodJournalAngle(int i) { return m_rodJournalAngles[i]; }
inline double getSlaveThrow() const { return m_slaveThrow; }
inline double getCenterOfMass() const { return m_centerOfMass; }
inline double getLength() const { return m_length; }
inline double getMass() const { return m_m; }
inline double getMomentOfInertia() const { return m_I; }
inline int getJournal() const { return m_journal; }
int getLayer() const;
inline ConnectingRod *getMasterRod() const { return m_master; }
inline Crankshaft *getCrankshaft() const { return m_crankshaft; }
inline Piston *getPiston() const { return m_piston; }
protected:
double m_centerOfMass;
double m_length;
double m_m;
double m_I;
int m_journal;
ConnectingRod *m_master;
Crankshaft *m_crankshaft;
Piston *m_piston;
double m_slaveThrow;
double *m_rodJournalAngles;
int m_rodJournalCount;
};
#endif /* ATG_ENGINE_SIM_CONNECTING_ROD_H */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。