| 25 | } |
| 26 | |
| 27 | int sol_lua_push( |
| 28 | sol::types<zm::vec3>, lua_State* L, const zm::vec3& v) { |
| 29 | // create table |
| 30 | sol::state_view lua(L); |
| 31 | sol::table vec3table = sol::table::create_with( |
| 32 | L, "x", v.x, "y", v.y, "z", v.z); |
| 33 | // use base sol method to |
| 34 | // push the table |
| 35 | int amount = sol::stack::push(L, vec3table); |
| 36 | // return # of things pushed onto stack |
| 37 | return amount; |
| 38 | } |