Function wt::util::rotation_matrix(const dir3_t&, const dir3_t&)¶
Defined in File rotation.hpp
Function Documentation¶
-
inline auto wt::util::rotation_matrix(const dir3_t &from, const dir3_t &to) noexcept¶
Builds a 3d rotation matrix that rotates from a given unit vector ‘from’ to a given unit vector ‘to’. Adapted from PBR book.
Builds a 2d rotation matrix that rotates from a given unit vector ‘from’ to a given unit vector ‘to’.