* Creates a rotation matrix from individual basis vectors. * @param[in] forward Forward vector. * @param[in] up Up vector. * @return 3x3 rotation matrix. */
| 74 | * @return 3x3 rotation matrix. |
| 75 | */ |
| 76 | inline float3x3 createMatrixFromBasis(const float3& forward, const float3& up) |
| 77 | { |
| 78 | float3 f = normalize(forward); |
| 79 | float3 s = normalize(cross(up, forward)); |
| 80 | float3 u = cross(f, s); |
| 81 | |
| 82 | return math::matrixFromColumns(s, u, f); |
| 83 | } |
| 84 | |
| 85 | /** |
| 86 | * Creates a rotation matrix from look-at coordinates. |
no test coverage detected