Blender V2.61 - r43446
Public Member Functions

SCA_LogicManager Class Reference

#include <SCA_LogicManager.h>

List of all members.

Public Member Functions

 SCA_LogicManager ()
virtual ~SCA_LogicManager ()
void RegisterEventManager (SCA_EventManager *eventmgr)
void RegisterToSensor (SCA_IController *controller, class SCA_ISensor *sensor)
void RegisterToActuator (SCA_IController *controller, class SCA_IActuator *actuator)
void BeginFrame (double curtime, double fixedtime)
void UpdateFrame (double curtime, bool frame)
void EndFrame ()
void AddActiveActuator (SCA_IActuator *actua, bool event)
void AddTriggeredController (SCA_IController *controller, SCA_ISensor *sensor)
SCA_EventManagerFindEventManager (int eventmgrtype)
vector< class SCA_EventManager * > GetEventManagers ()
void RemoveGameObject (const STR_String &gameobjname)
void RemoveSensor (SCA_ISensor *sensor)
void RemoveController (SCA_IController *controller)
void RemoveActuator (SCA_IActuator *actuator)
void RegisterMeshName (const STR_String &meshname, void *mesh)
void UnregisterMeshName (const STR_String &meshname, void *mesh)
CTR_Map< STR_HashedString,
void * > & 
GetMeshMap ()
CTR_Map< STR_HashedString,
void * > & 
GetActionMap ()
void RegisterActionName (const STR_String &actname, void *action)
void * GetActionByName (const STR_String &actname)
void * GetMeshByName (const STR_String &meshname)
void RegisterGameObjectName (const STR_String &gameobjname, CValue *gameobj)
class CValueGetGameObjectByName (const STR_String &gameobjname)
void RegisterGameMeshName (const STR_String &gamemeshname, void *blendobj)
void * FindBlendObjByGameMeshName (const STR_String &gamemeshname)
void RegisterGameObj (void *blendobj, CValue *gameobj)
void UnregisterGameObj (void *blendobj, CValue *gameobj)
CValueFindGameObjByBlendObj (void *blendobj)

Detailed Description

This manager handles sensor, controllers and actuators. logic executes each frame the following way: find triggering sensors build list of controllers that are triggered by these triggering sensors process all triggered controllers during this phase actuators can be added to the active actuator list process all active actuators clear triggering sensors clear triggered controllers (actuators may be active during a longer timeframe)

Definition at line 73 of file SCA_LogicManager.h.


Constructor & Destructor Documentation

SCA_LogicManager::SCA_LogicManager ( )

Definition at line 43 of file SCA_LogicManager.cpp.

SCA_LogicManager::~SCA_LogicManager ( ) [virtual]

Definition at line 49 of file SCA_LogicManager.cpp.

References assert, and SG_DList::Empty().


Member Function Documentation

void SCA_LogicManager::AddActiveActuator ( SCA_IActuator actua,
bool  event 
) [inline]
void SCA_LogicManager::AddTriggeredController ( SCA_IController controller,
SCA_ISensor sensor 
)
void SCA_LogicManager::BeginFrame ( double  curtime,
double  fixedtime 
)

Definition at line 187 of file SCA_LogicManager.cpp.

References NULL, SG_QList::QRemove(), and SG_DList::Remove().

Referenced by KX_Scene::LogicBeginFrame().

void SCA_LogicManager::EndFrame ( )

Definition at line 299 of file SCA_LogicManager.cpp.

Referenced by KX_Scene::LogicEndFrame().

void * SCA_LogicManager::FindBlendObjByGameMeshName ( const STR_String gamemeshname)

Definition at line 139 of file SCA_LogicManager.cpp.

References NULL.

Referenced by KX_Scene::ReplaceMesh().

SCA_EventManager * SCA_LogicManager::FindEventManager ( int  eventmgrtype)
CValue * SCA_LogicManager::FindGameObjByBlendObj ( void *  blendobj)

Definition at line 131 of file SCA_LogicManager.cpp.

References NULL.

Referenced by KX_Scene::DupliGroupRecurse().

void * SCA_LogicManager::GetActionByName ( const STR_String actname)

Definition at line 252 of file SCA_LogicManager.cpp.

References NULL.

Referenced by BL_Action::Play().

CTR_Map<STR_HashedString,void*>& SCA_LogicManager::GetActionMap ( ) [inline]

Definition at line 131 of file SCA_LogicManager.h.

Referenced by KX_BlenderSceneConverter::FreeBlendFile().

vector<class SCA_EventManager*> SCA_LogicManager::GetEventManagers ( ) [inline]

Definition at line 115 of file SCA_LogicManager.h.

Referenced by KX_Scene::MergeScene().

CValue * SCA_LogicManager::GetGameObjectByName ( const STR_String gameobjname)

Definition at line 119 of file SCA_LogicManager.cpp.

References NULL.

void * SCA_LogicManager::GetMeshByName ( const STR_String meshname)

Definition at line 265 of file SCA_LogicManager.cpp.

References NULL.

CTR_Map<STR_HashedString,void*>& SCA_LogicManager::GetMeshMap ( ) [inline]

Definition at line 130 of file SCA_LogicManager.h.

Referenced by KX_BlenderSceneConverter::FreeBlendFile().

void SCA_LogicManager::RegisterActionName ( const STR_String actname,
void *  action 
)
void SCA_LogicManager::RegisterEventManager ( SCA_EventManager eventmgr)

Definition at line 83 of file SCA_LogicManager.cpp.

Referenced by KX_Scene::KX_Scene(), and KX_Scene::SetPhysicsEnvironment().

void SCA_LogicManager::RegisterGameMeshName ( const STR_String gamemeshname,
void *  blendobj 
)
void SCA_LogicManager::RegisterGameObj ( void *  blendobj,
CValue gameobj 
)
void SCA_LogicManager::RegisterGameObjectName ( const STR_String gameobjname,
CValue gameobj 
)
void SCA_LogicManager::RegisterMeshName ( const STR_String meshname,
void *  mesh 
)
void SCA_LogicManager::RegisterToActuator ( SCA_IController controller,
class SCA_IActuator actuator 
)
void SCA_LogicManager::RegisterToSensor ( SCA_IController controller,
class SCA_ISensor sensor 
)
void SCA_LogicManager::RemoveActuator ( SCA_IActuator actuator)
void SCA_LogicManager::RemoveController ( SCA_IController controller)
void SCA_LogicManager::RemoveGameObject ( const STR_String gameobjname)
void SCA_LogicManager::RemoveSensor ( SCA_ISensor sensor)

remove Logic Bricks from the running logicmanager

Definition at line 148 of file SCA_LogicManager.cpp.

References SCA_ISensor::UnlinkAllControllers(), and SCA_ISensor::UnregisterToManager().

Referenced by KX_Scene::NewRemoveObject().

void SCA_LogicManager::UnregisterGameObj ( void *  blendobj,
CValue gameobj 
)

Definition at line 112 of file SCA_LogicManager.cpp.

References CTR_Map< Key, Value >::remove().

Referenced by KX_Scene::NewRemoveObject().

void SCA_LogicManager::UnregisterMeshName ( const STR_String meshname,
void *  mesh 
)

Definition at line 284 of file SCA_LogicManager.cpp.

References CTR_Map< Key, Value >::remove().

void SCA_LogicManager::UpdateFrame ( double  curtime,
bool  frame 
)

The documentation for this class was generated from the following files: