VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Typedefs | Functions
luaScriptInterface Namespace Reference

Other functions that are Lua-specific, so not in the VRF class declarations, but do not belong in the interface impl class either. More...

Typedefs

typedef luabind::object(* rwToLuaBindObjectFcn )(DtReaderWriter *rw, lua_State *L)

Functions

luabind::object luaGetEntityParam (lua_State *L, const DtScriptVrfObject &entity, std::string const &paramName)
luabind::object luaGetSystemAttribute (const DtScriptComponentSystem &system, const std::string &attributeName, bool *error, lua_State *L)
luabind::object luaGetContactInfo (lua_State *L, const DtScriptVrfObject &thisEntity, const DtScriptVrfObject &otherEntity)
 Gets the perceived contact info that this entity has for another entity.
std::list< DtScriptVrfObjectluaGetContactsWithFilter (lua_State *L, const DtScriptVrfObject &entity, luabind::object const &typeFilters, bool observedOnly)
 This function supports the script API.
bool luaSetStateProperty (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, luabind::object const &prop)
 Sets the specified state property with the given value.
bool luaSetStatePropertyListItem (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, luabind::object const &keyValues, luabind::object const &itemValue)
 Sets a single item in a list state property to the given value.
bool luaSetStatePropertyMapItem (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, luabind::object const &keyValue, luabind::object const &itemValue)
 Sets a single item in a map state property to the given value.
luabind::object luaGetStateProperty (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName)
 Returns an object containing the value of the requested state property.
luabind::object luaGetStatePropertyListItem (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, luabind::object const &keyValues)
 Returns an object containing the value of the of an item in the given state property.
luabind::object luaGetStatePropertyMapItem (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, luabind::object const &keyValue)
 Returns an object containing the value of the of an item in the given state property.
luabind::object luaGetParamProperty (lua_State *L, const DtScriptVrfObject &entity, std::string const &paramName)
 Returns an object containing the value of the requested parameter property.
luabind::object luaGetParameterPropertyListItem (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, luabind::object const &keyValues)
 Returns an object containing the value of the of an item in the given parameter property.
luabind::object luaGetParameterPropertyMapItem (lua_State *L, const DtScriptVrfObject &entity, const std::string &propertyName, luabind::object const &keyValue)
 Returns an object containing the value of the of an item in the given parameter property.
bool luaSetSystemAttribute (DtScriptComponentSystem &system, const std::string &attributeName, const luabind::object &value, lua_State *L)
static const std::map
< DtString,
rwToLuaBindObjectFcn > & 
rwToLuaBindObjectMap ()

Detailed Description

Other functions that are Lua-specific, so not in the VRF class declarations, but do not belong in the interface impl class either.

They are used for methods for geometry objects, etc. (Similar functions for VRF objects are in the file luaVrfObjectCommands.h.)

Typedef Documentation

typedef luabind::object(* luaScriptInterface::rwToLuaBindObjectFcn)(DtReaderWriter *rw, lua_State *L)

Function Documentation

luabind::object luaScriptInterface::luaGetEntityParam ( lua_State *  L,
const DtScriptVrfObject entity,
std::string const &  paramName 
)
luabind::object luaScriptInterface::luaGetSystemAttribute ( const DtScriptComponentSystem system,
const std::string &  attributeName,
bool error,
lua_State *  L 
)
luabind::object luaScriptInterface::luaGetContactInfo ( lua_State *  L,
const DtScriptVrfObject thisEntity,
const DtScriptVrfObject otherEntity 
)

Gets the perceived contact info that this entity has for another entity.

std::list<DtScriptVrfObject> luaScriptInterface::luaGetContactsWithFilter ( lua_State *  L,
const DtScriptVrfObject entity,
luabind::object const &  typeFilters,
bool  observedOnly 
)

This function supports the script API.

It gets the list of contacts matching the given filter and returns it. The Lua API function requires this list be returned in a table, so there is a wrapper function for it in the vrfLua module.

bool luaScriptInterface::luaSetStateProperty ( lua_State *  L,
const DtScriptVrfObject entity,
const std::string &  propertyName,
luabind::object const &  prop 
)

Sets the specified state property with the given value.

If the property does not exist or the format of the data is incorrect, returns false.

bool luaScriptInterface::luaSetStatePropertyListItem ( lua_State *  L,
const DtScriptVrfObject entity,
const std::string &  propertyName,
luabind::object const &  keyValues,
luabind::object const &  itemValue 
)

Sets a single item in a list state property to the given value.

First looks in the list to see if any existing items match the specified key fields and values. If so, the existing item is updated. If not, a new list item is added. If the property does not exist or the format of the data is incorrect, returns false.

bool luaScriptInterface::luaSetStatePropertyMapItem ( lua_State *  L,
const DtScriptVrfObject entity,
const std::string &  propertyName,
luabind::object const &  keyValue,
luabind::object const &  itemValue 
)

Sets a single item in a map state property to the given value.

First looks in the map to see if any existing items match the specified key value. If so, the existing item is updated. If not, a new list item is added. If the property does not exist or the format of the data is incorrect, returns false.

luabind::object luaScriptInterface::luaGetStateProperty ( lua_State *  L,
const DtScriptVrfObject entity,
const std::string &  propertyName 
)

Returns an object containing the value of the requested state property.

May be a table containing a number of fields that make up the property, or a single value. If the property could not be found, the returned table will be empty.

luabind::object luaScriptInterface::luaGetStatePropertyListItem ( lua_State *  L,
const DtScriptVrfObject entity,
const std::string &  propertyName,
luabind::object const &  keyValues 
)

Returns an object containing the value of the of an item in the given state property.

The state property must be a list. The item returned will have values matching the specified key values in the key fields. The result may be a table containing a number of fields that make up the item, or a single value, depending on the data type of the list items. If the property or list item could not be found, the returned table will be empty.

luabind::object luaScriptInterface::luaGetStatePropertyMapItem ( lua_State *  L,
const DtScriptVrfObject entity,
const std::string &  propertyName,
luabind::object const &  keyValue 
)

Returns an object containing the value of the of an item in the given state property.

The state property must be a map. The item returned will have values matching the specified key value. The result may be a table containing a number of fields that make up the item, or a single value, depending on the data type of the list items. If the property or map item could not be found, the returned table will be empty.

luabind::object luaScriptInterface::luaGetParamProperty ( lua_State *  L,
const DtScriptVrfObject entity,
std::string const &  paramName 
)

Returns an object containing the value of the requested parameter property.

May be a table containing a number of fields that make up the property, or a single value. If the property could not be found, the returned table will be empty.

luabind::object luaScriptInterface::luaGetParameterPropertyListItem ( lua_State *  L,
const DtScriptVrfObject entity,
const std::string &  propertyName,
luabind::object const &  keyValues 
)

Returns an object containing the value of the of an item in the given parameter property.

The property must be a list. The item returned will have values matching the specified key values in the key fields. The result may be a table containing a number of fields that make up the item, or a single value, depending on the data type of the list items. If the property or list item could not be found, the returned table will be empty.

luabind::object luaScriptInterface::luaGetParameterPropertyMapItem ( lua_State *  L,
const DtScriptVrfObject entity,
const std::string &  propertyName,
luabind::object const &  keyValue 
)

Returns an object containing the value of the of an item in the given parameter property.

The property must be a map. The item returned will have values matching the specified key value. The result may be a table containing a number of fields that make up the item, or a single value, depending on the data type of the list items. If the property or map item could not be found, the returned table will be empty.

bool luaScriptInterface::luaSetSystemAttribute ( DtScriptComponentSystem system,
const std::string &  attributeName,
const luabind::object &  value,
lua_State *  L 
)
static const std::map<DtString, rwToLuaBindObjectFcn>& luaScriptInterface::rwToLuaBindObjectMap ( )
static

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)