add mat4.from_quat(...) & update mat4.decompose(...)

This commit is contained in:
MihailRis
2024-07-19 07:48:42 +03:00
parent 2294690f29
commit 02c9c4ced3
16 changed files with 167 additions and 137 deletions
+6 -6
View File
@@ -138,16 +138,16 @@ static int l_raycast(lua::State* L) {
lua::createtable(L, 0, 6);
}
lua::pushvec3_arr(L, start + dir * ray->distance);
lua::pushvec3(L, start + dir * ray->distance);
lua::setfield(L, "endpoint");
lua::pushvec3_arr(L, ray->normal);
lua::pushvec3(L, ray->normal);
lua::setfield(L, "normal");
lua::pushnumber(L, glm::distance(start, end));
lua::setfield(L, "length");
lua::pushvec3_arr(L, iend);
lua::pushvec3(L, iend);
lua::setfield(L, "iendpoint");
lua::pushinteger(L, block);
@@ -162,16 +162,16 @@ static int l_raycast(lua::State* L) {
} else {
lua::createtable(L, 0, 5);
}
lua::pushvec3_arr(L, end);
lua::pushvec3(L, end);
lua::setfield(L, "endpoint");
lua::pushvec3_arr(L, normal);
lua::pushvec3(L, normal);
lua::setfield(L, "normal");
lua::pushnumber(L, glm::distance(start, end));
lua::setfield(L, "length");
lua::pushvec3_arr(L, iend);
lua::pushvec3(L, iend);
lua::setfield(L, "iendpoint");
lua::pushinteger(L, block);