xc
PrincipalAxes3D.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // xc utils library; general purpose classes and functions.
4 //
5 // Copyright (C) Luis C. Pérez Tato
6 //
7 // XC utils is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This software is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.
19 // If not, see <http://www.gnu.org/licenses/>.
20 //----------------------------------------------------------------------------
21 //PrincipalAxes3D.h
22 
23 #ifndef PRINCIPALAXESOFINERTIA3D_H
24 #define PRINCIPALAXESOFINERTIA3D_H
25 
26 #include "utility/geom/pos_vec/Pos3d.h"
27 #include "utility/geom/pos_vec/Vector3d.h"
28 
29 class Ref3d3d;
30 
32 //
35  {
36  Pos3d center_of_mass;
37  Vector3d axis1;
38  Vector3d axis2;
39  GEOM_FT i1;
40  GEOM_FT i2;
41  GEOM_FT i3;
42  public:
43  PrincipalAxes3D(void);
44  PrincipalAxes3D(const Pos3d &, const double A[3][3]);
45  PrincipalAxes3D(const Pos3d &, const GEOM_FT &, const GEOM_FT &, const GEOM_FT &, const GEOM_FT &, const GEOM_FT &, const GEOM_FT &);
46  inline Pos3d getOrg(void) const
47  { return center_of_mass; }
48  Ref3d3d getAxis(void) const;
49  const GEOM_FT &I1() const;
50  const GEOM_FT &I2() const;
51  const GEOM_FT &I3() const;
52  inline Vector3d getAxis1VDir(void) const
53  { return axis1; }
54  inline Vector3d getAxis2VDir(void) const
55  { return axis2; }
56  Vector3d getAxis3VDir(void) const;
57  };
58 
59 std::ostream &operator<<(std::ostream &os,const PrincipalAxes3D &axis);
60 
61 
62 #endif
63 
64 
65 
66 
Vector3d getAxis3VDir(void) const
Return the direction vector of the minor principal axis of inertia.
Definition: PrincipalAxes3D.cc:78
PrincipalAxes3D(void)
Constructor.
Definition: PrincipalAxes3D.cc:28
Posición en tres dimensiones.
Definition: Pos3d.h:44
Principals axes of inertia in planar geometry.
Definition: PrincipalAxes3D.h:34
Vector en tres dimensiones.
Definition: Vector3d.h:39
Three-dimensional reference system defined in a three-dimensional space.
Definition: Ref3d3d.h:39