1 #ifndef AREA_MOMENT_H_INCLUDED
2 #define AREA_MOMENT_H_INCLUDED
30 : m_xx(0.0), m_xy(0.0), m_yy(0.0)
35 : m_xx(xx), m_xy(xy), m_yy(yy)
41 m_xx += rhs.m_xx; m_xy += rhs.m_xy; m_yy += rhs.m_yy;
47 m_xx -= rhs.m_xx; m_xy -= rhs.m_xy; m_yy -= rhs.m_yy;
58 return AreaMoment(i1.m_xx + i2.m_xx, i1.m_xy + i2.m_xy, i1.m_yy + i2.m_yy);
61 inline AreaMoment operator-(
const AreaMoment& i1,
const AreaMoment& i2)
63 return AreaMoment(i1.m_xx - i2.m_xx, i1.m_xy - i2.m_xy, i1.m_yy - i2.m_yy);
66 inline std::ostream& operator<<(std::ostream& os,
const AreaMoment& i)
68 os <<
"AreaMoment: {" << std::endl;
69 os <<
"\t " << i.m_xx <<
" , " << i.m_xy <<
" , " << i.m_yy << std::endl;
76 #endif // end-of-include-guard
Namespace for the core simulator.
Structure with functionality for calculations of the area moment of inertia.