gz/math/Sphere.hh
Precision DensityFromMass(const Precision _mass) const
Compute the sphere's density given a mass value. The sphere is assumed to be solid with uniform densi...
Definition: gz/math/AdditivelySeparableScalarField3.hh:27
void SetMaterial(const Material &_mat)
Set the material associated with this sphere.
const Material & Material() const
Get the material associated with this sphere.
Contains information about a single material.
Definition: gz/math/Material.hh:65
bool MassMatrix(MassMatrix3d &_massMat) const
Get the mass matrix for this sphere. This function is only meaningful if the sphere's radius and mate...
Precision VolumeBelow(const Plane< Precision > &_plane) const
Get the volume of sphere below a given plane in m^3. It is assumed that the center of the sphere is o...
bool SetDensityFromMass(const Precision _mass)
Set the density of this sphere based on a mass value. Density is computed using Precision DensityFrom...
Sphere< float > Spheref
Sphere with float precision.
Definition: gz/math/Sphere.hh:153
bool operator!=(const Sphere &_sphere) const
Check if this sphere is not equal to the provided sphere. Radius and material properties will be chec...
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...
Sphere< double > Sphered
Sphere with double precision.
Definition: gz/math/Sphere.hh:149
A class for inertial information about a rigid body consisting of the scalar mass and a 3x3 symmetric...
Definition: gz/math/MassMatrix3.hh:45
Sphere< int > Spherei
Sphere with integer precision.
Definition: gz/math/Sphere.hh:145
bool operator==(const Sphere &_sphere) const
Check if this sphere is equal to the provided sphere. Radius and material properties will be checked.