34 #ifndef RBD_rigidBody_H 35 #define RBD_rigidBody_H 54 inline Ostream&
operator<<(Ostream&,
const rigidBody&);
static autoPtr< rigidBody > New(const word &name, const scalar &m, const vector &c, const symmTensor &Ic)
Select constructed from components.
Ostream & operator<<(Ostream &, const rigidBody &)
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual void write(Ostream &) const
Write.
const word & name() const
Return name.
void merge(const subBody &)
Merge a body into this parent body.
const symmTensor & Ic() const
Return the inertia tensor of the rigid-body about the centre of mass.
friend Ostream & operator<<(Ostream &, const rigidBody &)
scalar m() const
Return the mass of the rigid-body.
virtual autoPtr< rigidBody > clone() const
Return clone of this rigidBody.
const vector & c() const
Return the centre of mass of the rigid-body.
This specialized rigidBody holds the original body after it has been merged into a master...
A class for handling words, derived from string.
virtual bool massless() const
Return false as this body is not massless.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
rigidBody(const word &name, const scalar &m, const vector &c, const symmTensor &Ic)
Construct from mass, centre of mass and moment of inertia tensor.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Macros to ease declaration of run-time selection tables.
declareRunTimeSelectionTable(autoPtr, rigidBody, dictionary,(const word &name, const dictionary &dict),(name, dict))
virtual ~rigidBody()
Destructor.
TypeName("rigidBody")
Runtime type information.
This class represents the linear and angular inertia of a rigid body by the mass, centre of mass and ...