1#ifndef NNGN_MATH_LUA_VECTOR_H
2#define NNGN_MATH_LUA_VECTOR_H
17 using base_type::base_type;
Data block allocated for user data objects.
Definition: user.h:73
Type used to get/push vectors as user data in Lua.
Definition: lua_vector.h:14
lua_vector(lua_Integer n)
Convenience n-element construction from a lua_Integer.
Definition: lua_vector.h:19
typename std::vector< T > base_type
Definition: lua_vector.h:15
lua_vector(base_type &&rhs)
Definition: lua_vector.h:21
Definition: alloc.cpp:100
T push(nngn::lua::state_view lua, auto &&v)
Definition: state.h:186
To narrow(const From &x)
Casts x to a narrower type, asserting that the value is preserved.
Definition: utils.h:99
Functions/macros for registering user types.
#define NNGN_LUA_DECLARE_USER_TYPE(T,...)
Declares that T objects should be manipulated as a user type.
Definition: register.h:124
get
Definition: camera.lua:36
v[1]
Definition: math.lua:19
static const lua_vector< T > & get(lua_State *L, int i)
Definition: lua_vector.h:37
static lua_vector< T > * get(lua_State *L, int i)
Definition: lua_vector.h:30
Reads a value from the Lua stack.
Definition: lua.h:117
static int push(lua_State *L, lua_vector< T > v)
Definition: lua_vector.h:44
Pushes a value onto the Lua stack.
Definition: lua.h:119
Operations on light/full user data values.
#define FWD(...)
Definition: utils.h:18