creates a quaternion from three base unit vectors * * The resulting quaternion describes the rotation from the * identity quaternion (no rotation) to the coordinate system * as described by the given x, y and z base unit vectors. * * @name vmath.quat_basis * @param x [type:vector3] x base vector * @param y [type:vector3] y base vector * @param z [type:v
| 1300 | * ``` |
| 1301 | */ |
| 1302 | static int Quat_Basis(lua_State* L) |
| 1303 | { |
| 1304 | Vector3* x = CheckVector3(L, 1); |
| 1305 | Vector3* y = CheckVector3(L, 2); |
| 1306 | Vector3* z = CheckVector3(L, 3); |
| 1307 | Matrix3 m; |
| 1308 | m.setCol0(*x); |
| 1309 | m.setCol1(*y); |
| 1310 | m.setCol2(*z); |
| 1311 | PushQuat(L, Quat(m)); |
| 1312 | return 1; |
| 1313 | } |
| 1314 | |
| 1315 | /*# creates a quaternion from rotation around x-axis |
| 1316 | * |
nothing calls this directly
no test coverage detected