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

Function Matrix4_Quat

engine/script/src/script_vmath.cpp:1603–1607  ·  view source on GitHub ↗

creates a matrix from a quaternion * The resulting matrix describes the same rotation as the quaternion, but does not have any translation (also like the quaternion). * * @name vmath.matrix4_quat * @param q [type:quaternion] quaternion to create matrix from * @return m [type:matrix4] matrix represented by quaternion * @examples * * ```lua * local vec =

Source from the content-addressed store, hash-verified

1601 * ```
1602 */
1603 static int Matrix4_Quat(lua_State* L)
1604 {
1605 PushMatrix4(L, Matrix4::rotation(*CheckQuat(L, 1)));
1606 return 1;
1607 }
1608
1609 /*# creates a matrix from an axis and an angle
1610 * The resulting matrix describes a rotation around the axis by the specified angle.

Callers

nothing calls this directly

Calls 2

PushMatrix4Function · 0.85
CheckQuatFunction · 0.85

Tested by

no test coverage detected