16 #include <argos3/core/utility/datatypes/datatypes.h>
17 #include <argos3/core/utility/math/vector2.h>
34 static int Create(lua_State* pt_state);
36 template<
class... TArguments>
37 static void PushVector2(lua_State* pt_state, TArguments&&... t_arguments) {
40 lua_newuserdata(pt_state,
sizeof(
CVector2));
42 new (pvUserdatum)
CVector2(std::forward<TArguments>(t_arguments)...);
44 luaL_getmetatable(pt_state, m_strTypeId.c_str());
45 lua_setmetatable(pt_state, -2);
50 static int Index(lua_State* pt_state);
52 static int NewIndex(lua_State* pt_state);
54 static int ToString(lua_State* pt_state);
56 static int Equal(lua_State* pt_state);
58 static int Add(lua_State* pt_state);
60 static int Multiply(lua_State* pt_state);
62 static int Subtract(lua_State* pt_state);
66 static int Normalize(lua_State* pt_state);
68 static int Length(lua_State* pt_state);
74 static int Rotate(lua_State* pt_state);
78 static const std::string m_strTypeId;
The namespace containing all the ARGoS related code.
static int Multiply(lua_State *pt_state)
static int Add(lua_State *pt_state)
static int CrossProduct(lua_State *pt_state)
static int UnaryMinus(lua_State *pt_state)
static int Length(lua_State *pt_state)
static int NewIndex(lua_State *pt_state)
static void RegisterType(lua_State *pt_state)
static int Rotate(lua_State *pt_state)
static int DotProduct(lua_State *pt_state)
static int Index(lua_State *pt_state)
static CVector2 & ToVector2(lua_State *pt_state, int n_index)
static int Equal(lua_State *pt_state)
static void PushVector2(lua_State *pt_state, TArguments &&... t_arguments)
static int ToString(lua_State *pt_state)
static int Subtract(lua_State *pt_state)
static int Normalize(lua_State *pt_state)
static const std::string & GetTypeId()
static int Create(lua_State *pt_state)