MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / createMatrixFromBasis

Function createMatrixFromBasis

Source/Falcor/Utils/Math/FalcorMath.h:76–83  ·  view source on GitHub ↗

* Creates a rotation matrix from individual basis vectors. * @param[in] forward Forward vector. * @param[in] up Up vector. * @return 3x3 rotation matrix. */

Source from the content-addressed store, hash-verified

74 * @return 3x3 rotation matrix.
75 */
76inline 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.

Callers 1

createMatrixFromLookAtFunction · 0.85

Calls 3

matrixFromColumnsFunction · 0.85
normalizeFunction · 0.70
crossFunction · 0.70

Tested by

no test coverage detected