darts/spherical.h file

Namespace Spherical.

Namespaces

namespace Spherical
Working with spherical coordinate and angles.

Functions

auto rad2deg(float value) -> float
Convert radians to degrees.
auto deg2rad(float value) -> float
Convert degrees to radians.
template<typename T>
auto sincos(T arg) -> std::pair<T, T>
Return the sine and cosine in a single function call.
template<typename T>
auto theta(const Vec3<T>& v) -> T
template<typename T>
auto cos_theta(const Vec3<T>& v) -> T
template<typename T>
auto sin_theta(const Vec3<T>& v) -> T
template<typename T>
auto tan_theta(const Vec3<T>& v) -> T
template<typename T>
auto sin_theta2(const Vec3<T>& v) -> T
template<typename T>
auto phi(const Vec3<T>& v) -> T
template<typename T>
auto sin_phi(const Vec3<T>& v) -> T
template<typename T>
auto cos_phi(const Vec3<T>& v) -> T
template<typename T>
auto sin_phi2(const Vec3<T>& v) -> T
template<typename T>
auto cos_phi2(const Vec3<T>& v) -> T
template<typename T>
auto spherical_coordinates_to_direction(const Vec2<T>& phi_theta) -> Vec3<T>
Convert spherical (phi,theta) coordinates to a unit direction in Cartesian coordinates.
template<typename T>
auto direction_to_spherical_coordinates(const Vec3<T>& v) -> Vec2<T>
Convert a unit direction from Cartesian coordinates to spherical (phi,theta) coordinates.