17 #ifndef IGNITION_MATH_SPHERE_HH_ 18 #define IGNITION_MATH_SPHERE_HH_ 32 inline namespace IGNITION_MATH_VERSION_NAMESPACE {
40 template<
typename Precision>
44 public:
Sphere() =
default;
48 public:
explicit Sphere(
const Precision _radius);
56 public: ~
Sphere() =
default;
60 public: Precision Radius()
const;
64 public:
void SetRadius(
const Precision _radius);
84 public:
bool operator==(
const Sphere &_sphere)
const;
88 public:
bool operator!=(
const Sphere &_sphere)
const;
92 public: Precision Volume()
const;
102 public: Precision DensityFromMass(
const Precision _mass)
const;
116 public:
bool SetDensityFromMass(
const Precision _mass);
119 private: Precision radius = 0.0;
139 #include "ignition/math/detail/Sphere.hh" Sphere< double > Sphered
Sphere with double precision.
Definition: Sphere.hh:131
A class for inertial information about a rigid body consisting of the scalar mass and a 3x3 symmetric...
Definition: MassMatrix3.hh:45
Contains information about a single material.
Definition: Material.hh:65
A representation of a sphere.
Definition: Sphere.hh:41
Sphere< float > Spheref
Sphere with float precision.
Definition: Sphere.hh:135
Sphere< int > Spherei
Sphere with integer precision.
Definition: Sphere.hh:127