|
AGXDynamics
2.31.1.0
|
The agxLua namespace contain classes for coupling AGX to Lua. More...
Classes | |
| class | GarbageListener |
| Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation system agx::DynamicsSystem. More... | |
| class | LuaCall |
| The class encapsulates method calls from C++ to lua. More... | |
| class | LuaCallback |
| class | LuaError |
| class | LuaScriptOperation |
| class | ScriptManager |
Typedefs | |
| typedef agx::observer_ptr < const LuaScriptOperation > | LuaScriptOperationConstObserver |
| typedef agx::ref_ptr< const LuaScriptOperation > | LuaScriptOperationConstRef |
| typedef agx::observer_ptr < LuaScriptOperation > | LuaScriptOperationObserver |
| typedef agx::ref_ptr < LuaScriptOperation > | LuaScriptOperationRef |
Functions | |
| AGXLUA_EXPORT void * | _tousertype (lua_State *L, int index, const char *type) |
| This method will return a variable of a specified stack index. More... | |
| agx::CylindricalJoint * | castSerializableToCylindricalJoint (agxStream::Serializable *obj) |
| agx::Hinge * | castSerializableToHinge (agxStream::Serializable *obj) |
| agx::Prismatic * | castSerializableToPrismatic (agxStream::Serializable *obj) |
| AGXLUA_EXPORT int | doFile (lua_State *L) |
| AGXLUA_EXPORT int | doString (lua_State *L) |
| AGXLUA_EXPORT void | ensurepointer (lua_State *L, const void *p) |
| AGXLUA_EXPORT void | error (lua_State *L) |
| AGXLUA_EXPORT void | error (lua_State *L, const char *msg, tolua_Error *err) |
| AGXLUA_EXPORT void | getpointertable (lua_State *L) |
| AGXLUA_EXPORT std::string | getStackTrace (lua_State *L) |
| AGXLUA_EXPORT int | pcall (lua_State *L, int nargs, int nresults, int errfunc) |
| AGXLUA_EXPORT void | pushstring (lua_State *L, const char *value) |
| AGXLUA_EXPORT bool | pushusertype (lua_State *L, void *p, const char *name) |
| AGXLUA_EXPORT int | requestPlugin (lua_State *L) |
| AGXLUA_EXPORT int | tableToRealPairVector (lua_State *L) |
| Function that will take a table of tables and convert it to a agx::RealPairVector The table has to follow the format {{1,2},{3,4},...} otherwise an error is generated. More... | |
| AGXLUA_EXPORT int | tableToRealVector (lua_State *L) |
| Function that will take a table of numbers and convert it to a agx::RealVector The table has to follow the format {{1,2,3,4,...} otherwise an error is generated. More... | |
| AGXLUA_EXPORT bool | testuserdata (lua_State *L, int index, const char *name) |
| AGXLUA_EXPORT const char * | tostring (lua_State *L, int narg, const char *def="") |
| template<typename T > | |
| T * | tousertype (lua_State *L, int index, const char *type) |
| template<typename T > | |
| T * | tousertype (lua_State *L, const char *variableName, const char *type) |
| This method will return a variable of a global named variable It will be tested for type (using tolua++) and if it is the correct user type, it will be statically cast and returned,. More... | |
The agxLua namespace contain classes for coupling AGX to Lua.
| typedef agx::observer_ptr< const LuaScriptOperation > agxLua::LuaScriptOperationConstObserver |
Definition at line 37 of file LuaScriptOperation.h.
| typedef agx::ref_ptr< const LuaScriptOperation > agxLua::LuaScriptOperationConstRef |
Definition at line 37 of file LuaScriptOperation.h.
Definition at line 37 of file LuaScriptOperation.h.
Definition at line 37 of file LuaScriptOperation.h.
| AGXLUA_EXPORT void* agxLua::_tousertype | ( | lua_State * | L, |
| int | index, | ||
| const char * | type | ||
| ) |
This method will return a variable of a specified stack index.
It will be tested for type (using tolua++) and if it is the correct user type, it will be statically cast and returned,
| L | - Lua state |
| index | - Index of the Lua stack where to find the variable to be queried |
| type | - C++ type of the variable that should be returned. |
Referenced by tousertype().
|
inline |
Definition at line 42 of file castUtils.h.
|
inline |
Definition at line 30 of file castUtils.h.
|
inline |
Definition at line 36 of file castUtils.h.
| AGXLUA_EXPORT int agxLua::doFile | ( | lua_State * | L | ) |
| AGXLUA_EXPORT int agxLua::doString | ( | lua_State * | L | ) |
| AGXLUA_EXPORT void agxLua::ensurepointer | ( | lua_State * | L, |
| const void * | p | ||
| ) |
| AGXLUA_EXPORT void agxLua::error | ( | lua_State * | L | ) |
| AGXLUA_EXPORT void agxLua::error | ( | lua_State * | L, |
| const char * | msg, | ||
| tolua_Error * | err | ||
| ) |
| AGXLUA_EXPORT void agxLua::getpointertable | ( | lua_State * | L | ) |
| AGXLUA_EXPORT std::string agxLua::getStackTrace | ( | lua_State * | L | ) |
| AGXLUA_EXPORT int agxLua::pcall | ( | lua_State * | L, |
| int | nargs, | ||
| int | nresults, | ||
| int | errfunc | ||
| ) |
| AGXLUA_EXPORT void agxLua::pushstring | ( | lua_State * | L, |
| const char * | value | ||
| ) |
Referenced by agxLua::LuaCall::pushString().
| AGXLUA_EXPORT bool agxLua::pushusertype | ( | lua_State * | L, |
| void * | p, | ||
| const char * | name | ||
| ) |
Referenced by agxLua::LuaCall::pushUsertype().
| AGXLUA_EXPORT int agxLua::requestPlugin | ( | lua_State * | L | ) |
| AGXLUA_EXPORT int agxLua::tableToRealPairVector | ( | lua_State * | L | ) |
Function that will take a table of tables and convert it to a agx::RealPairVector The table has to follow the format {{1,2},{3,4},...} otherwise an error is generated.
Can be used in Lua as:
vector = agx.tableToRealPairVector( {{1,2},{3,4},{5,6}} The type of vector will be "agx::RealPairVector"
| AGXLUA_EXPORT int agxLua::tableToRealVector | ( | lua_State * | L | ) |
Function that will take a table of numbers and convert it to a agx::RealVector The table has to follow the format {{1,2,3,4,...} otherwise an error is generated.
Can be used in Lua as:
vector = agx.tableToRealVector( {{1,2,3,4,5,6} The type of vector will be "agx::RealVector"
| AGXLUA_EXPORT bool agxLua::testuserdata | ( | lua_State * | L, |
| int | index, | ||
| const char * | name | ||
| ) |
| AGXLUA_EXPORT const char* agxLua::tostring | ( | lua_State * | L, |
| int | narg, | ||
| const char * | def = "" |
||
| ) |
| T* agxLua::tousertype | ( | lua_State * | L, |
| int | index, | ||
| const char * | type | ||
| ) |
Definition at line 110 of file luaUtils.h.
References _tousertype().
| T* agxLua::tousertype | ( | lua_State * | L, |
| const char * | variableName, | ||
| const char * | type | ||
| ) |
This method will return a variable of a global named variable It will be tested for type (using tolua++) and if it is the correct user type, it will be statically cast and returned,.
| L | - Lua state |
| variableName | - Name of a global variable that should be queried |
| type | - C++ type of the variable that should be returned. |
Definition at line 126 of file luaUtils.h.