![]() |
MAK Legion 1.1 API Documentation
|
Go to the source code of this file.
Typedefs | |
| typedef void(* | C_BeginFrameCallback )(void *usr, double simTime) |
| typedef void(* | C_EndFrameCallback )(void *usr) |
| typedef void(* C_BeginFrameCallback)(void *usr, double simTime) |
Begin frame callback function
| typedef void(* C_EndFrameCallback)(void *usr) |
End frame callback function
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_addBeginFrameCallback | ( | DatabaseHandle | db, |
| C_BeginFrameCallback | func, | ||
| void * | usr | ||
| ) |
Add and register a callback function to get invoked by database at DB begin frame
| [in] | db | The database handle |
| [in] | func | A callback function to be registered |
| [in] | usr | User data passed to the callback function |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_addEndFrameCallback | ( | DatabaseHandle | db, |
| C_EndFrameCallback | func, | ||
| void * | usr | ||
| ) |
Add and register a callback function to get invoked by database at DB end frame
| [in] | db | The database handle |
| [in] | func | A callback function to be registered |
| [in] | usr | User data passed to the callback function |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_beginFrame | ( | DatabaseHandle | db, |
| double | simTime | ||
| ) |
Legion database begin frame call, tells the simulation database the simulation time and begins bookkeeping work
| [in] | db | The database handle |
| [in] | simTime | The simulation time |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_capacity | ( | DatabaseHandle | db, |
| AttributeSetId | setType, | ||
| UInt32 * | count | ||
| ) |
Reserve database for attribute set
| [in] | db | The database handle |
| [in] | setType | An unique identifier of attributeSet |
| [out] | count | Return the capacity reserved for this type of attributeSet |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_clientId | ( | DatabaseHandle | db, |
| ClientId * | clientId | ||
| ) |
Get client id
| [in] | db | The database handle |
| [out] | clientId | Return client identifier |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_controlManager | ( | DatabaseHandle | db, |
| ControlManagerHandle * | controlManagerHandle | ||
| ) |
Get control manager
| [in] | db | The database handle |
| [out] | controlManagerHandle | Return control manager handle |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_createInstance | ( | DatabaseHandle | db, |
| AttributeSetId | setId, | ||
| InstanceHandle * | handle | ||
| ) |
Create an instance of attributeSet
| [in] | db | The database handle |
| [in] | setId | The attributeSet identifier |
| [out] | handle | Output the instance handle of newly created attributeSet instance |
Referenced by Legion::SimulationDatabase::createInstance(), and Legion::createInstance().
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_createSimulationDatabase | ( | const ConfigHandle | config, |
| DatabaseHandle * | dbHandle | ||
| ) |
Create simulation database
| [in] | config | The configuration handle |
| [out] | type | Return the database handle created |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_currentFrame | ( | DatabaseHandle | db, |
| UInt64 * | frameCount | ||
| ) |
Get the current frame number
| [in] | db | The database handle |
| [out] | frameCount | Return the current frame number |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_destroyInstance | ( | InstanceHandle | inst | ) |
Delete an instance of attributeSet
| [in] | inst | The instance handle of attributeSet to delete |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_destroySimulationDatabase | ( | DatabaseHandle | db | ) |
Delete simulation database
| [in] | db | The database handle |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_endFrame | ( | DatabaseHandle | db | ) |
Legion database end frame call, finishes bookkeeping work
| [in] | db | The database handle |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_eventManager | ( | DatabaseHandle | db, |
| EventManagerHandle * | eventManagerHandle | ||
| ) |
Get event manager
| [in] | db | The database handle |
| [out] | eventManagerHandle | Return event manager handle |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_findAttributeIndexById | ( | DatabaseHandle | db, |
| AttributeSetId | setId, | ||
| UInt32 | attrId, | ||
| AttributeIndex * | index | ||
| ) |
Get database attribute table index using the attributeSet id and attribute id
| [in] | db | The database handle |
| [in] | setId | The attributeSet identifier |
| [in] | attributeId | The attribute identifier |
| [out] | index | Output the attribute's table index of this attributeSet |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_findAttributeIndexByName | ( | DatabaseHandle | db, |
| AttributeSetId | setId, | ||
| const char * | attributeName, | ||
| AttributeIndex * | index | ||
| ) |
Get database attribute table index using the attributeSet id and attribute name
| [in] | db | The database handle |
| [in] | setId | The attributeSet identifier |
| [in] | attributeName | The attribute name |
| [out] | index | Output the attribute's table index of this attributeSet |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_findAttributeSetId | ( | DatabaseHandle | db, |
| const char * | setName, | ||
| AttributeSetId * | setId | ||
| ) |
Get unique attributeSet identifier using the attributeSet name
| [in] | db | The database handle |
| [in] | setName | The attributeSet name |
| [out] | setId | Output the attributeSet identifier |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_getClientId | ( | InstanceHandle | inst, |
| ClientId * | clientIdPtr | ||
| ) |
Get the owning client identifier of an instance
| [in] | inst | The instance handle |
| [out] | clientIdPtr | Output the client id of this instance |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_getDatabaseHandleForInstance | ( | InstanceHandle | inst, |
| DatabaseHandle * | dbHandle | ||
| ) |
Get instance identifier from instance's global Id
| [in] | inst | The instance handle of an entity |
| [out] | dbHandle | Returns the database handle |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_getGlobalId | ( | InstanceHandle | inst, |
| GlobalId * | gidPtr | ||
| ) |
Get the Global identifier of an instance
| [in] | inst | The instance handle |
| [out] | gidPtr | Output the global identifier |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_getInstanceId | ( | DatabaseHandle | db, |
| GlobalId | globalId, | ||
| InstanceHandle * | handlePtr | ||
| ) |
Get instance identifier from instance's global Id
| [in] | db | The database handle |
| [in] | globalId | The global identifier of an instance |
| [out] | handlePtr | Returns the instance handle of this GlobalId instance |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_inFrame | ( | DatabaseHandle | db, |
| LEG_Bool * | inFrame | ||
| ) |
Check if the database is in a frame, in between the DB beginFrame and endFrame calls
| [in] | db | The database handle |
| [out] | inFrame | Return true if it's inFrame, false if it's not |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_isValid | ( | InstanceHandle | inst, |
| LEG_Bool * | isValid | ||
| ) |
Check if an instance handle is valid
| [in] | inst | The instance handle |
| [out] | isValid | An output flag indicates whether the database is valid |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_registerAttribute | ( | DatabaseHandle | db, |
| AttributeSetId | setId, | ||
| const LEG_AttributeDescriptor * | descriptor, | ||
| AttributeIndex * | index | ||
| ) |
Get unique attribute identifier using the attributeSet id and attribute name
| [in] | db | The database handle |
| [in] | setId | The attributeSet identifier |
| [in] | descriptor | The attribute set descriptor |
| [out] | index | Output the attribute's table index of this attributeSet |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_registerAttributeSet | ( | DatabaseHandle | db, |
| const LEG_AttributeSetDescriptor * | setDesc, | ||
| AttributeSetId * | setId | ||
| ) |
Register attribute set descriptor
| [in] | db | The database handle |
| [in] | setDesc | The attributeSet descriptor |
| [out] | setId | The attributeSet identifier |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_removeBeginFrameCallback | ( | DatabaseHandle | db, |
| C_BeginFrameCallback | func, | ||
| void * | usr | ||
| ) |
Remove and unregister the callback function from getting invoked by database at DB begin frame
| [in] | db | The database handle |
| [in] | func | A callback function to be registered |
| [in] | usr | User data passed to the callback function |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_removeEndFrameCallback | ( | DatabaseHandle | db, |
| C_EndFrameCallback | func, | ||
| void * | usr | ||
| ) |
Remove and unregister the callback function from getting invoked by database at DB end frame
| [in] | db | The database handle |
| [in] | func | A callback function to be registered |
| [in] | usr | User data passed to the callback function |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_reserve | ( | DatabaseHandle | db, |
| AttributeSetId | setType, | ||
| UInt32 | count | ||
| ) |
Reserve database for attribute set
| [in] | db | The database handle |
| [in] | setType | An unique identifier of attributeSet |
| [in] | count | The capacity count to reserve |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_setClientId | ( | DatabaseHandle | db, |
| ClientId | clientId | ||
| ) |
Set client id
| [in] | db | The database handle |
| [out] | clientId | Return client identifier |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_setTypeForInstance | ( | InstanceHandle | inst, |
| UInt32 * | setType | ||
| ) |
Get the attributeSet identifier of an instance
| [in] | inst | The instance handle |
| [out] | setType | The set type of the instance identifier |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_simTime | ( | DatabaseHandle | db, |
| double * | simTime | ||
| ) |
Get the current simulation time
| [in] | db | The database handle |
| [out] | simTime | Return simulation time |
| LEGIONRUNTIME_DLL LEG_ReturnCode legion_db_viewManager | ( | DatabaseHandle | db, |
| ViewManagerHandle * | viewManagerHandle | ||
| ) |
Get view manager
| [in] | db | The database handle |
| [out] | viewManagerHandle | Return view manager handle |