Package populus :: Module MainEngine :: Class MainEngine
[frames] | no frames]

Class MainEngine


Main Engine of the CADIA-Populus Simulation Framework.

Nested Classes

Inherited from lib.singletonmixin.Singleton: __metaclass__

Instance Methods
 
__init__(self, playerName='Player1', selectionMode=1, multiplayer=0, headtracking=False)
Constructor.
 
setAgentMode(self, manager)
 
createMainPlayer(self, name)
 
OnClick(self)
Handle the click event.
 
showOnScreenMessage(self, msg)
 
highlightAvatar(self)
 
unhighlightAvatar(self)
 
getPlayerDest(self, playerName)
 
setPlayerDest(self, playerName, dest)
 
getPlayerPosHpr(self, playerName)
 
setPlayerPosHpr(self, playerName, poshpr, enforce=0)
 
setRemotePlayerPosHpr(self, name, poshpr, tStamp, enforce=0)
 
setPlayerFocus(self, playerName)
 
setPlayerColor(self, playerName, color)
 
setPlayerInteractionWith(self, playerName, objName)
 
setNewSayMsg(self, playerName, text)
 
throwNewInteraction(self, obj)
 
throwNewChatMsg(self, participants, text)
 
throwNewSayMsg(self, text)
 
throwNewKeyPressed(self)
 
setNewChatMsg(self, sender, text)
 
getPlayerFromName(self, playerName)
 
addPlayer(self, name, pos2D=(0, 0))
Add an avatar into the scene.
 
removePlayer(self, name)
Remove an Avatar from the scene.
 
addRemotePlayer(self, name, pos2D=(0, 0), color=(1, 1, 1))
 
removeRemotePlayer(self, name)
 
enableSelectionMode(self)
 
disableSelectionMode(self)
 
gameLoop(self, task)
The main game loop.
 
multiplayerGameLoop(self, task)
The main game loop in multiplayer mode.
 
switchCamera(self)
 
mouseLook(self)
 
toggleFullscreen(self)
DOES NOT WORK
 
togglePerceptAnnotations(self)
 
toggleBehaviorAnnotations(self)
 
toggleAnnotations(self)
 
toggleConvAnnotations(self)
 
toggleSelectionMode(self)
 
toggleStepByStepMode(self)
 
toggleStatDisplays(self)
 
save(self, filename=None)
 
load(self, filename=None)
 
getEditableProperties(self, id)
 
setEditableProperties(self, id, properties)
 
renameObject(self, name, newName)

Inherited from direct.showbase.DirectObject.DirectObject: accept, acceptOnce, addTask, classTree, detectLeaks, doMethodLater, getAllAccepting, ignore, ignoreAll, isAccepting, isIgnoring, removeAllTasks, removeTask

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Methods

Inherited from lib.singletonmixin.Singleton: getInstance, isInstantiated

Properties

Inherited from object: __class__

Method Details

__init__(self, playerName='Player1', selectionMode=1, multiplayer=0, headtracking=False)
(Constructor)

 

Constructor.

Overrides: object.__init__
(inherited documentation)

removePlayer(self, name)

 

Remove an Avatar from the scene. The Avatar under user control cannot be removed.

Arguments: name -- Avatar's name