MAK Legion API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Functions | Variables
main.cxx File Reference

Contains the simple give example for Legion ownership divestiture. More...

Functions

DtFilename theExitFile ("clutterExit.sig")
 
void parseArgsForConfigFile (int argc, char **argv)
 
void printHelp (int argc, char **argv, const std::string &helpString)
 
int main (int argc, char **argv)
 

Variables

int MAX_ENTITY = 10000
 
int MAX_GRID = 10000
 
int minx = 0
 
int miny = 0
 
int maxx = MAX_GRID
 
int maxy = MAX_GRID
 
float referenceLatitude = 0.0
 
float referenceLongitude = 0.0
 
float theFramerate = 1.0
 
float theFrameTime = 1.0 / theFramerate
 
bool theToggleForceId = false
 
std::string theConfigFile = "legionClutter.lua"
 

Detailed Description

Contains the simple give example for Legion ownership divestiture.

Contains the simple transfer ownership example for Legion ownership acquisition.

Contains the simple take example for Legion ownership acquisition.

Contains the simple listen example for Legion connection.

An entity is created and initialized but not simulated. When an acquisition request is received via callback, the entity is divested and a new entity is created.

There 2 transfer modes - automatic (default) and manual (-m on command line) To start, no entity is simulated. In automatic mode, a request to acquire an entity is made via the requestAcquisition service. The request is not made until there are entities available to be taken. After acquiring an entity via the OwnershipAcquired callback, the entity is simulated to move to a destination. Upon reaching the destination, the entity is destroyed and a new cycle of acquiring and simulating is begun. In manual mode, the invocation of the requestAcquisition service must be manually triggered via the command prompt (pressing the 't' key). A simulating entity may be preemptively destroyed by pressing the 'd' key. Transfer mode can be switched from automatic to manual by pressing the 'm' key and vice versa the 'a' key.

The client can create an entity or attempt to acquire an entity. The following commands allow the user to trigger the operations that perform ownership transfer. Note: the command token is case insensitive. 'c' - create an entity 't' - request ownership 'g' - divest ownership (use after receiving ownership divest request) 'd' - destroy the entity 'a' - make divesting automatic 'm' - make divesting manual (default mode; requires 'g' command)

Function Documentation

int main ( int  argc,
char **  argv 
)
void parseArgsForConfigFile ( int  argc,
char **  argv 
)

References theConfigFile.

Referenced by main().

void printHelp ( int  argc,
char **  argv,
const std::string &  helpString 
)

References theConfigFile.

Referenced by main().

DtFilename theExitFile ( "clutterExit.sig"  )

Referenced by main().

Variable Documentation

int MAX_ENTITY = 10000

Referenced by main().

int MAX_GRID = 10000
int maxx = MAX_GRID

Referenced by main().

int maxy = MAX_GRID

Referenced by main().

int minx = 0

Referenced by main().

int miny = 0

Referenced by main().

float referenceLatitude = 0.0

Referenced by main().

float referenceLongitude = 0.0

Referenced by main().

std::string theConfigFile = "legionClutter.lua"
float theFramerate = 1.0

Referenced by main().

float theFrameTime = 1.0 / theFramerate

Referenced by main().

bool theToggleForceId = false

Referenced by main().


Document ID: Generated on Mon Mar 8 15:11:30 EST 2021 from SVN revision 225633
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)