MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / computeViewMatrix

Function computeViewMatrix

TheForceEngine/TFE_System/math.cpp:5–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3namespace TFE_Math
4{
5 Mat3 computeViewMatrix(const Vec3f* lookDir, const Vec3f* upDir)
6 {
7 Vec3f rightDir = cross(lookDir, upDir);
8 rightDir = normalize(&rightDir);
9
10 Vec3f orthoUp = cross(&rightDir, lookDir);
11 orthoUp = normalize(&orthoUp);
12
13 return { rightDir, orthoUp, *lookDir };
14 }
15
16 Mat3 transpose(const Mat3& mtx)
17 {

Callers 2

thumbnail_updateFunction · 0.85
computeCameraTransformFunction · 0.85

Calls 2

crossFunction · 0.70
normalizeFunction · 0.70

Tested by

no test coverage detected