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

Function Quat_Matrix4

engine/script/src/script_vmath.cpp:2401–2406  ·  view source on GitHub ↗

creates a new quaternion from matrix4 * * Creates a new quaternion with the components set * according to the supplied parameter values. * * @name vmath.quat_matrix4 * @param matrix [type:matrix4] source matrix4 * @return q [type:quaternion] new quaternion */

Source from the content-addressed store, hash-verified

2399 * @return q [type:quaternion] new quaternion
2400 */
2401 static int Quat_Matrix4(lua_State* L)
2402 {
2403 Matrix4* matrix = CheckMatrix4(L, 1);
2404 PushQuat(L, dmVMath::Quat(matrix->getUpper3x3()));
2405 return 1;
2406 }
2407
2408 /*# creates a new matrix4 from translation, rotation and scale
2409 *

Callers

nothing calls this directly

Calls 4

CheckMatrix4Function · 0.85
PushQuatFunction · 0.85
QuatClass · 0.50
getUpper3x3Method · 0.45

Tested by

no test coverage detected