MCPcopy Create free account
hub / github.com/DavidColson/Polybox / LuaLight

Function LuaLight

source/bind_graphics.cpp:265–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263// ***********************************************************************
264
265int LuaLight(lua_State* pLua) {
266 i32 id = (i32)luaL_checkinteger(pLua, 1);
267
268 Vec3f direction;
269 direction.x = (f32)luaL_checknumber(pLua, 2);
270 direction.y = (f32)luaL_checknumber(pLua, 3);
271 direction.z = (f32)luaL_checknumber(pLua, 4);
272
273 // consider making colors a type that can be more easily passed in?
274 Vec3f color;
275 color.x = (f32)luaL_checknumber(pLua, 5);
276 color.y = (f32)luaL_checknumber(pLua, 6);
277 color.z = (f32)luaL_checknumber(pLua, 7);
278
279 Light(id, direction, color);
280 return 0;
281}
282
283// ***********************************************************************
284

Callers

nothing calls this directly

Calls 1

LightFunction · 0.85

Tested by

no test coverage detected