diff --git a/Spherical.cpp b/Spherical.cpp index 7f6c3ca..9552373 100644 --- a/Spherical.cpp +++ b/Spherical.cpp @@ -107,6 +107,12 @@ template <> const SphericalOf SphericalOf::zero = SphericalOf(0.0f, AngleOf(0), AngleOf(0)); +template +SphericalOf SphericalOf::WithDistance(float distance) { + SphericalOf v = SphericalOf(distance, this->horizontal, this->vertical); + return SphericalOf(); +} + template SphericalOf SphericalOf::operator-() const { SphericalOf v = diff --git a/Spherical.h b/Spherical.h index 2c4a12b..159520a 100644 --- a/Spherical.h +++ b/Spherical.h @@ -51,6 +51,8 @@ class SphericalOf { /// @brief A normalized down-oriented vector const static SphericalOf down; + SphericalOf WithDistance(float distance); + /// @brief Negate the vector /// @return The negated vector /// This will rotate the vector by 180 degrees horizontally and