Free Electron
Mass.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __math_Mass_h__
8 #define __math_Mass_h__
9 
10 namespace fe
11 {
12 
13 class FE_DL_EXPORT Mass
14 {
15  public:
16  Mass(void) {}
17 
18  void cylinder( Axis a_axis,
19  Real a_density,
20  Real a_radius,
21  Real a_length);
22 
23  void tube( Axis a_axis,
24  Real a_density,
25  Real a_radiusOuter,
26  Real a_radiusInner,
27  Real a_length);
28 
29  void rotate( const SpatialTransform &a_rotation);
30  void translate( const SpatialVector &a_translation);
31 
32  Mass &operator +=(const Mass &a_other);
33 
34  Matrix<3,3,Real> &I(void) { return m_inertia; }
35  Real &mass(void) { return m_mass; }
36  Vector<3,Real> &cg(void) { return m_cg; }
37  const Matrix<3,3,Real> &getI(void) const { return m_inertia; }
38  const Real &getMass(void) const { return m_mass; }
39  const Vector<3,Real> &getCg(void) const { return m_cg; }
40 
41  private:
42  Matrix<3,3,Real> m_inertia;
43  Real m_mass;
44  Vector<3,Real> m_cg;
45 };
46 
47 } /* namespace */
48 
49 #endif /* __math_Mass_h__ */
50 
kernel
Definition: namespace.dox:3