mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add mat4.from_quat(...) & update mat4.decompose(...)
This commit is contained in:
parent
2294690f29
commit
02c9c4ced3
16 changed files with 167 additions and 137 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue