1#ifndef NNGN_MATH_LUA_VECTOR_H
2#define NNGN_MATH_LUA_VECTOR_H
7#include "lua/register.h"
14class lua_vector :
public std::vector<T> {
17 using base_type::base_type;
29struct stack_get<lua_vector<
T>*> {
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
for i
Definition: font.lua:5
n
Definition: dump_lights.lua:5
get
Definition: camera.lua:39
v[1]
Definition: math.lua:19
#define NNGN_LUA_DECLARE_USER_TYPE(T,...)
Declares that T objects should be manipulated as a user type.
Definition: register.h:124
#define FWD(...)
Definition: utils.h:18
Definition: lua_audio.cpp:19
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:101
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