Capsule.hh
Go to the documentation of this file.
A representation of a capsule or sphere-capped cylinder.
Definition: Capsule.hh:44
const Material & Mat() const
Get the material associated with this capsule.
bool SetDensityFromMass(const Precision _mass)
Set the density of this capsule based on a mass value. Density is computed using Precision DensityFro...
Precision DensityFromMass(const Precision _mass) const
Compute the capsule's density given a mass value. The capsule is assumed to be solid with uniform den...
Capsule(const Precision _length, const Precision _radius)
Construct a capsule with a length and radius.
bool operator==(const Capsule &_capsule) const
Check if this capsule is equal to the provided capsule. Radius, length, and material properties will ...
Capsule(const Precision _length, const Precision _radius, const Material &_mat)
Construct a capsule with a length, radius, and material.
Capsule()=default
Default constructor. The default radius and length are both zero.
void SetMat(const Material &_mat)
Set the material associated with this capsule.
std::optional< MassMatrix3< Precision > > MassMatrix() const
Get the mass matrix for this capsule. This function is only meaningful if the capsule's radius,...
Capsule< float > Capsulef
Capsule with float precision.
Definition: Capsule.hh:145
Capsule< int > Capsulei
Capsule with integer precision.
Definition: Capsule.hh:137
Capsule< double > Capsuled
Capsule with double precision.
Definition: Capsule.hh:141
Definition: Angle.hh:43