gz/math/Ellipsoid.hh
std::optional< MassMatrix3< Precision > > MassMatrix() const
Get the mass matrix for this ellipsoid. This function is only meaningful if the ellipsoid's radii and...
Definition: gz/math/AdditivelySeparableScalarField3.hh:27
Contains information about a single material.
Definition: gz/math/Material.hh:65
bool operator==(const Ellipsoid &_ellipsoid) const
Check if this ellipsoid is equal to the provided ellipsoid. Radius, length, and material properties w...
const Material & Mat() const
Get the material associated with this ellipsoid.
bool SetDensityFromMass(const Precision _mass)
Set the density of this ellipsoid based on a mass value. Density is computed using Precision DensityF...
Ellipsoid< double > Ellipsoidd
Ellipsoid with double precision.
Definition: gz/math/Ellipsoid.hh:142
Precision VolumeBelow(const Plane< Precision > &_plane) const
Get the volume of ellipsoid below a given plane in m^3. It is assumed that the center of the ellipsoi...
void SetMat(const Material &_mat)
Set the material associated with this ellipsoid.
A representation of a general ellipsoid.
Definition: gz/math/Ellipsoid.hh:40
Ellipsoid< int > Ellipsoidi
Ellipsoid with integer precision.
Definition: gz/math/Ellipsoid.hh:138
Ellipsoid()=default
Default constructor. The default radius and length are both zero.
Precision DensityFromMass(const Precision _mass) const
Compute the ellipsoid's density given a mass value. The ellipsoid is assumed to be solid with uniform...
void SetRadii(const Vector3< Precision > &_radii)
Set the radius in meters.
Ellipsoid< float > Ellipsoidf
Ellipsoid with float precision.
Definition: gz/math/Ellipsoid.hh:146
std::optional< Vector3< Precision > > CenterOfVolumeBelow(const Plane< Precision > &_plane) const
Center of volume below the plane. This is useful for example when calculating where buoyancy should b...