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...
void merge(const subBody &)
Merge a body into this parent body.
const word & name() const
Return name.
friend Ostream & operator<<(Ostream &, const rigidBody &)
virtual autoPtr< rigidBody > clone() const
Return clone of this rigidBody.
scalar m() const
Return the mass of the rigid-body.
A class for handling words, derived from string.
virtual void write(Ostream &) const
Write.
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.
virtual bool massless() const
Return false as this body is not massless.
declareRunTimeSelectionTable(autoPtr, rigidBody, dictionary,(const word &name, const dictionary &dict),(name, dict))
const vector & c() const
Return the centre of mass of the rigid-body.
virtual ~rigidBody()
Destructor.
const symmTensor & Ic() const
Return the inertia tensor of the rigid-body about the centre of mass.
TypeName("rigidBody")
Runtime type information.