Callable object rotating an \(\mathbb{R}^3\) vector using a quaternion.
#include <kyosu/kyosu.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
auto theta = eve::pio_3(eve::as<double>());
std::array<double, 3> ax{1., 2., 3.};
std::array<double, 3> v{ 1.5, 2.0, -3.0};
std::cout << " v " << v[0] << ", " << v[1] << ", " << v[2] << ")\n";
std::cout << " q " << q << std::endl;
std::cout << " rotate_vec(q, v) " << " -> (" << rv[0] << ", " << rv[1] << ", " << rv[2] << ")\n";
return 0;
}
constexpr tags::callable_from_angle_axis from_angle_axis
Callable object computing an an unitary quaternion from an angle value and a 3 dimensionnal axis vect...
Definition: from_angle_axis.hpp:115