17 #ifndef IGNITION_MATH_SPHERE_HH_ 18 #define IGNITION_MATH_SPHERE_HH_ 33 inline namespace IGNITION_MATH_VERSION_NAMESPACE {
41 template<
typename Precision>
45 public:
Sphere() =
default;
49 public:
explicit Sphere(
const Precision _radius);
57 public: ~
Sphere() =
default;
61 public: Precision Radius()
const;
65 public:
void SetRadius(
const Precision _radius);
85 public:
bool operator==(
const Sphere &_sphere)
const;
89 public:
bool operator!=(
const Sphere &_sphere)
const;
93 public: Precision Volume()
const;
109 public: std::optional<Vector3<Precision>>
120 public: Precision DensityFromMass(
const Precision _mass)
const;
134 public:
bool SetDensityFromMass(
const Precision _mass);
137 private: Precision radius = 0.0;
157 #include "ignition/math/detail/Sphere.hh" Sphere< double > Sphered
Sphere with double precision.
Definition: Sphere.hh:149
A class for inertial information about a rigid body consisting of the scalar mass and a 3x3 symmetric...
Definition: MassMatrix3.hh:45
A plane and related functions.
Definition: Plane.hh:38
Contains information about a single material.
Definition: Material.hh:65
A representation of a sphere.
Definition: Sphere.hh:42
Sphere< float > Spheref
Sphere with float precision.
Definition: Sphere.hh:153
Sphere< int > Spherei
Sphere with integer precision.
Definition: Sphere.hh:145