cisst-saw
Loading...
Searching...
No Matches
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-2019 Johns Hopkins University (JHU), All Rights Reserved.
7
8--- begin cisst license - do not edit ---
9
10This software is provided "as is" under an open source license, with
11no warranty. The complete license can be found in license.txt and
12http://www.cisst.org/cisst/license.txt.
13
14--- end cisst license ---
15*/
16
17#ifndef _robMass_h
18#define _robMass_h
19
20#include <iostream>
21
24#if CISST_HAS_JSON
25#include <json/json.h>
26#endif
28
30 public:
31
33
34 private:
35
37 double mass;
38
40
48
50
59
61
74
75public:
76
78
82 ParallelAxis( double m,
84 const vctFixedSizeMatrix<double,3,3>& I ) const;
85
86
88
92
93 robMass( double m,
97
99
102 const double & Mass(void) const;
103 double & Mass(void);
104
106
112
114
121
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
robMass::Errno ReadMass(std::istream &is)
Read the mass from a input stream.
vctFixedSizeMatrix< double, 3, 3 > ParallelAxis(double m, const vctFixedSizeVector< double, 3 > &t, const vctFixedSizeMatrix< double, 3, 3 > &I) const
Parallel Axis Theorem.
double & Mass(void)
robMass::Errno WriteMass(std::ostream &os) const
Write the mass from a output stream.
robMass()
Default constructor.
vctFixedSizeMatrix< double, 3, 3 > MomentOfInertia() const
Return the moment of inertia tensor in the body frame.
vctFixedSizeVector< double, 3 > CenterOfMass() const
Return the center of mass.
vctFixedSizeMatrix< double, 3, 3 > MomentOfInertiaAtCOM() const
Errno
Definition robMass.h:32
@ EFAILURE
Definition robMass.h:32
@ ESUCCESS
Definition robMass.h:32
const double & Mass(void) const
Return the mass.
robMass(double m, const vctFixedSizeVector< double, 3 > &com, const vctFixedSizeMatrix< double, 3, 3 > &D, const vctFixedSizeMatrix< double, 3, 3 > &V)
Implementation of a fixed-size matrix using template metaprogramming.
Definition vctFixedSizeMatrix.h:54
Implementation of a fixed-size vector using template metaprogramming.
Definition vctFixedSizeVector.h:54
Define a rotation matrix for a space of dimension 3.
Definition vctMatrixRotation3.h:51
#define CISST_EXPORT
Definition cmnExportMacros.h:50
Declaration of vctFrame4x4.
Declaration of vctMatrixRotation3.