MCPcopy Create free account
hub / github.com/defold/defold / Matrix4_LookAt

Function Matrix4_LookAt

engine/script/src/script_vmath.cpp:1508–1512  ·  view source on GitHub ↗

creates a look-at view matrix * * The resulting matrix is created from the supplied look-at parameters. * This is useful for constructing a view matrix for a camera or * rendering in general. * * @name vmath.matrix4_look_at * @param eye [type:vector3] eye position * @param look_at [type:vector3] look-at position * @param up [type:vector3] up vector

Source from the content-addressed store, hash-verified

1506 * ```
1507 */
1508 static int Matrix4_LookAt(lua_State* L)
1509 {
1510 PushMatrix4(L, Matrix4::lookAt(Point3(*CheckVector3(L, 1)), Point3(*CheckVector3(L, 2)), *CheckVector3(L, 3)));
1511 return 1;
1512 }
1513
1514 /*# creates an orthographic projection matrix
1515 * Creates an orthographic projection matrix.

Callers

nothing calls this directly

Calls 3

PushMatrix4Function · 0.85
CheckVector3Function · 0.85
Point3Class · 0.50

Tested by

no test coverage detected