| 143 | } |
| 144 | |
| 145 | btVector3 getLuaVectorArg(lua_State* L, int index) |
| 146 | { |
| 147 | btVector3 pos(0, 0, 0); |
| 148 | |
| 149 | int sz = luaL_returnlen(L, index); // get size of table |
| 150 | { |
| 151 | lua_rawgeti(L, index, 1); // push t[i] |
| 152 | pos[0] = lua_tonumber(L, -1); |
| 153 | lua_pop(L, 1); |
| 154 | lua_rawgeti(L, index, 2); // push t[i] |
| 155 | pos[1] = lua_tonumber(L, -1); |
| 156 | lua_pop(L, 1); |
| 157 | lua_rawgeti(L, index, 3); // push t[i] |
| 158 | pos[2] = lua_tonumber(L, -1); |
| 159 | lua_pop(L, 1); |
| 160 | } |
| 161 | return pos; |
| 162 | } |
| 163 | |
| 164 | btQuaternion getLuaQuaternionArg(lua_State* L, int index) |
| 165 | { |
no test coverage detected