tools/rLuaParser/raylib-lua_test.h
static Ray LuaGetArgument_Ray(lua_State *L, int index)
{
    Ray result = { 0 };
    index = lua_absindex(L, index); // Makes sure we use absolute indices because we push multiple values
    luaL_argcheck(L, lua_getfield(L, index, "position") == LUA_TNUMBER, index, "Expected Ray.position");
    result.position = LuaGetArgument_Vector3(L, -1);
    luaL_argcheck(L, lua_getfield(L, index, "direction") == LUA_TNUMBER, index, "Expected Ray.direction");
    result.direction = LuaGetArgument_Vector3(L, -1);
    lua_pop(L, 2);
    return result;
}
// Ray type (useful for raycast)
Ray type (useful for raycast)
Ray type ( useful for raycast )
static Ray LuaGetArgument_Ray(lua_State *L, int index)
{
    Ray result = { 0 };
    index = lua_absindex(L, index); 
    luaL_argcheck(L, lua_getfield(L, index, "position") == LUA_TNUMBER, index, "Expected Ray.position");
    result.position = LuaGetArgument_Vector3(L, -1);
    luaL_argcheck(L, lua_getfield(L, index, "direction") == LUA_TNUMBER, index, "Expected Ray.direction");
    result.direction = LuaGetArgument_Vector3(L, -1);
    lua_pop(L, 2);
    return result;
}
static Ray LuaGetArgument_Ray ( lua_State * L , int index ) { Ray result = { 0 } ; index = lua_absindex ( L , index ) ; luaL_argcheck ( L , lua_getfield ( L , index , " " ) == LUA_TNUMBER , index , " " ) ; result . position = LuaGetArgument_Vector3 ( L , -1 ) ; luaL_argcheck ( L , lua_getfield ( L , index , " " ) == LUA_TNUMBER , index , " " ) ; result . direction = LuaGetArgument_Vector3 ( L , -1 ) ; lua_pop ( L , 2 ) ; return result ; }
Ray type (useful for raycast)
Ray type ( useful for raycast )
// Makes sure we use absolute indices because we push multiple values