From 5209f81cc7b1503a2e42cfb7416e8622515da3be Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 26 Jan 2025 18:53:25 +0200 Subject: [PATCH] Add a Sphere convenience class For some reason this was missing even though there's Rectangle, Box and Circle. --- source/geometry/sphere.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 source/geometry/sphere.h diff --git a/source/geometry/sphere.h b/source/geometry/sphere.h new file mode 100644 index 0000000..9c87ad5 --- /dev/null +++ b/source/geometry/sphere.h @@ -0,0 +1,25 @@ +#ifndef MSP_GEOMETRY_SPHERE_H_ +#define MSP_GEOMETRY_SPHERE_H_ + +#include "hypersphere.h" + +namespace Msp { +namespace Geometry { + +/** +The three-dimensional special case of a HyperSphere. This class exists for +convenience only and does not provide any extra functionality over the base +class. +*/ +template +class Sphere: public HyperSphere +{ +public: + Sphere() = default; + explicit Sphere(T r): HyperSphere(r) { } +}; + +} // namespace Geometry +} // namespace Msp + +#endif -- 2.45.2