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