1 #ifndef LUA_QUATERNION_H
2 #define LUA_QUATERNION_H
16 #include <argos3/core/utility/datatypes/datatypes.h>
17 #include <argos3/core/utility/math/quaternion.h>
34 static int Create(lua_State* pt_state);
36 template<
class... TArguments>
37 static void PushQuaternion(lua_State* pt_state, TArguments&&... t_arguments) {
42 new (pvUserdatum)
CQuaternion(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 Multiply(lua_State* pt_state);
60 static int Normalize(lua_State* pt_state);
62 static int Inverse(lua_State* pt_state);
71 static const std::string m_strTypeId;
The namespace containing all the ARGoS related code.
static CQuaternion & ToQuaternion(lua_State *pt_state, int n_index)
static int Normalize(lua_State *pt_state)
static int Inverse(lua_State *pt_state)
static int ToAngleAxis(lua_State *pt_state)
static void RegisterType(lua_State *pt_state)
static int ToEulerAngles(lua_State *pt_state)
static const std::string & GetTypeId()
static void PushQuaternion(lua_State *pt_state, TArguments &&... t_arguments)
static int NewIndex(lua_State *pt_state)
static int Equal(lua_State *pt_state)
static int ToString(lua_State *pt_state)
static int Create(lua_State *pt_state)
static int Multiply(lua_State *pt_state)
static int Index(lua_State *pt_state)