MCPcopy Create free account
hub / github.com/DjDeveloperr/deno_desktop / lookToRh

Method lookToRh

examples/extern/gmath.bundle.js:1324–1329  ·  view source on GitHub ↗
(eye, dir, up)

Source from the content-addressed store, hash-verified

1322 return Matrix4.from(x, 0, 0, 0, 0, y, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
1323 }
1324 static lookToRh(eye, dir, up) {
1325 const f = dir.normal();
1326 const s = f.cross(up).normal();
1327 const u = s.cross(f);
1328 return Matrix4.from(s.x, u.x, -f.x, 0, s.y, u.y, -f.y, 0, s.z, u.z, -f.z, 0, -eye.dot(s), -eye.dot(u), eye.dot(f), 1);
1329 }
1330 static lookToLh(eye, dir, up) {
1331 return Matrix4.lookToRh(eye, dir.neg(), up);
1332 }

Callers

nothing calls this directly

Calls 4

crossMethod · 0.80
normalMethod · 0.45
fromMethod · 0.45
dotMethod · 0.45

Tested by

no test coverage detected