MCPcopy Create free account
hub / github.com/ThePhD/sol2 / sol_lua_get

Function sol_lua_get

examples/customization/source/lua_zm_interop.cpp:17–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17zm::vec3 sol_lua_get(sol::types<zm::vec3>, lua_State* L,
18 int index, sol::stack::record& tracking) {
19 sol::lua_table vec3table
20 = sol::stack::get<sol::lua_table>(L, index, tracking);
21 float x = vec3table["x"];
22 float y = vec3table["y"];
23 float z = vec3table["z"];
24 return zm::vec3 { x, y, z };
25}
26
27int sol_lua_push(
28 sol::types<zm::vec3>, lua_State* L, const zm::vec3& v) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected