cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
robMass.h
Go to the documentation of this file.
1 /*
2 
3  Author(s): Simon Leonard
4  Created on: Nov 11 2009
5 
6  (C) Copyright 2008 Johns Hopkins University (JHU), All Rights
7  Reserved.
8 
9 --- begin cisst license - do not edit ---
10 
11 This software is provided "as is" under an open source license, with
12 no warranty. The complete license can be found in license.txt and
13 http://www.cisst.org/cisst/license.txt.
14 
15 --- end cisst license ---
16 */
17 
18 #ifndef _robMass_h
19 #define _robMass_h
20 
21 #include <iostream>
22 
25 #if CISST_HAS_JSON
26 #include <json/json.h>
27 #endif
28 #include <cisstRobot/robExport.h>
29 
31  public:
32 
33  enum Errno{ ESUCCESS, EFAILURE };
34 
35  private:
36 
38  double mass;
39 
41 
49 
51 
60 
62 
75 
76 public:
77 
79 
83  ParallelAxis( double m,
85  const vctFixedSizeMatrix<double,3,3>& I ) const;
86 
87 
89 
92  robMass();
93 
94  robMass( double m,
98 
100 
103  double Mass() const;
104 
106 
111  vctFixedSizeVector<double,3> CenterOfMass() const;
112 
114 
120  vctFixedSizeMatrix<double,3,3> MomentOfInertia() const;
121 
122  vctFixedSizeMatrix<double,3,3> MomentOfInertiaAtCOM() const;
123 
125  robMass::Errno ReadMass( std::istream& is );
126 #if CISST_HAS_JSON
127  robMass::Errno ReadMass( const Json::Value &config );
128 #endif
129 
131  robMass::Errno WriteMass( std::ostream& os ) const;
132 
133 };
134 
135 #endif
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
Definition: robMass.h:33
Definition: robMass.h:30
Declaration of vctMatrixRotation3.
Declaration of vctFrame4x4.
Errno
Definition: robMass.h:33