Blender V2.61 - r43446
|
#include <SCA_IController.h>
Public Member Functions | |
SCA_IController (SCA_IObject *gameobj) | |
virtual | ~SCA_IController () |
virtual void | Trigger (class SCA_LogicManager *logicmgr)=0 |
void | LinkToSensor (SCA_ISensor *sensor) |
void | LinkToActuator (SCA_IActuator *) |
std::vector< class SCA_ISensor * > & | GetLinkedSensors () |
std::vector< class SCA_IActuator * > & | GetLinkedActuators () |
void | ReserveActuator (int num) |
void | UnlinkAllSensors () |
void | UnlinkAllActuators () |
void | UnlinkActuator (class SCA_IActuator *actua) |
void | UnlinkSensor (class SCA_ISensor *sensor) |
void | SetState (unsigned int state) |
void | ApplyState (unsigned int state) |
void | Deactivate () |
bool | IsJustActivated () |
void | ClrJustActivated () |
void | SetBookmark (bool bookmark) |
void | Activate (SG_DList &head) |
Protected Attributes | |
std::vector< class SCA_ISensor * > | m_linkedsensors |
std::vector< class SCA_IActuator * > | m_linkedactuators |
unsigned int | m_statemask |
bool | m_justActivated |
bool | m_bookmark |
Use of SG_DList element: none Use of SG_QList element: build ordered list of activated controller on the owner object Head: SCA_IObject::m_activeControllers
Definition at line 43 of file SCA_IController.h.
SCA_IController::SCA_IController | ( | SCA_IObject * | gameobj | ) |
Definition at line 44 of file SCA_IController.cpp.
SCA_IController::~SCA_IController | ( | ) | [virtual] |
Definition at line 54 of file SCA_IController.cpp.
void SCA_IController::Activate | ( | SG_DList & | head | ) | [inline] |
Definition at line 87 of file SCA_IController.h.
References SG_DList::AddBack(), SG_DList::AddFront(), SCA_ILogicBrick::InsertActiveQList(), SCA_IObject::m_activeBookmarkedControllers, SCA_IObject::m_activeControllers, m_bookmark, SCA_ILogicBrick::m_gameobj, SG_QList::QAddBack(), and SG_QList::QEmpty().
Referenced by SCA_LogicManager::AddTriggeredController().
void SCA_IController::ApplyState | ( | unsigned int | state | ) |
Definition at line 166 of file SCA_IController.cpp.
References SCA_ILogicBrick::IsActive(), m_justActivated, m_linkedactuators, m_linkedsensors, m_statemask, and SCA_ILogicBrick::SetActive().
void SCA_IController::ClrJustActivated | ( | ) | [inline] |
Definition at line 79 of file SCA_IController.h.
References m_justActivated.
void SCA_IController::Deactivate | ( | ) | [inline] |
Definition at line 70 of file SCA_IController.h.
References SG_DList::Delink().
Referenced by SCA_LogicManager::RemoveController().
std::vector< class SCA_IActuator * > & SCA_IController::GetLinkedActuators | ( | ) |
Definition at line 68 of file SCA_IController.cpp.
References m_linkedactuators.
Referenced by MergeScene_GameObject(), and KX_Scene::ReplicateLogic().
std::vector< class SCA_ISensor * > & SCA_IController::GetLinkedSensors | ( | ) |
Definition at line 61 of file SCA_IController.cpp.
References m_linkedsensors.
Referenced by MergeScene_GameObject(), and KX_Scene::ReplicateLogic().
bool SCA_IController::IsJustActivated | ( | ) | [inline] |
Definition at line 75 of file SCA_IController.h.
References m_justActivated.
Referenced by SCA_ISensor::Activate().
void SCA_IController::LinkToActuator | ( | SCA_IActuator * | actua | ) |
Definition at line 105 of file SCA_IController.cpp.
References SCA_IActuator::IncLink(), SCA_ILogicBrick::IsActive(), and m_linkedactuators.
Referenced by SCA_LogicManager::RegisterToActuator().
void SCA_IController::LinkToSensor | ( | SCA_ISensor * | sensor | ) |
Definition at line 135 of file SCA_IController.cpp.
References SCA_ISensor::IncLink(), SCA_ILogicBrick::IsActive(), and m_linkedsensors.
Referenced by SCA_LogicManager::RegisterToSensor().
void SCA_IController::ReserveActuator | ( | int | num | ) | [inline] |
Definition at line 60 of file SCA_IController.h.
References m_linkedactuators.
Referenced by LinkControllerToActuators().
void SCA_IController::SetBookmark | ( | bool | bookmark | ) | [inline] |
Definition at line 83 of file SCA_IController.h.
References m_bookmark.
Referenced by BL_ConvertControllers().
void SCA_IController::SetState | ( | unsigned int | state | ) | [inline] |
Definition at line 68 of file SCA_IController.h.
References m_statemask, and state.
Referenced by BL_ConvertControllers().
virtual void SCA_IController::Trigger | ( | class SCA_LogicManager * | logicmgr | ) | [pure virtual] |
void SCA_IController::UnlinkActuator | ( | class SCA_IActuator * | actua | ) |
Definition at line 114 of file SCA_IController.cpp.
References SCA_ILogicBrick::GetName(), CValue::GetName(), SCA_ILogicBrick::GetParent(), SCA_ILogicBrick::IsActive(), SCA_ILogicBrick::m_gameobj, m_linkedactuators, and STR_String::ReadPtr().
void SCA_IController::UnlinkAllActuators | ( | ) |
Definition at line 91 of file SCA_IController.cpp.
References SCA_ILogicBrick::IsActive(), and m_linkedactuators.
Referenced by SCA_LogicManager::RemoveController().
void SCA_IController::UnlinkAllSensors | ( | ) |
Definition at line 75 of file SCA_IController.cpp.
References SCA_ILogicBrick::IsActive(), and m_linkedsensors.
Referenced by SCA_LogicManager::RemoveController().
void SCA_IController::UnlinkSensor | ( | class SCA_ISensor * | sensor | ) |
Definition at line 144 of file SCA_IController.cpp.
References SCA_ISensor::DecLink(), SCA_ILogicBrick::GetName(), CValue::GetName(), SCA_ILogicBrick::GetParent(), SCA_ILogicBrick::IsActive(), SCA_ILogicBrick::m_gameobj, m_linkedsensors, and STR_String::ReadPtr().
bool SCA_IController::m_bookmark [protected] |
Definition at line 51 of file SCA_IController.h.
Referenced by Activate(), and SetBookmark().
bool SCA_IController::m_justActivated [protected] |
Definition at line 50 of file SCA_IController.h.
Referenced by ApplyState(), ClrJustActivated(), and IsJustActivated().
std::vector<class SCA_IActuator*> SCA_IController::m_linkedactuators [protected] |
Definition at line 48 of file SCA_IController.h.
Referenced by ApplyState(), GetLinkedActuators(), LinkToActuator(), ReserveActuator(), SCA_ExpressionController::Trigger(), SCA_NANDController::Trigger(), SCA_XORController::Trigger(), SCA_ANDController::Trigger(), SCA_XNORController::Trigger(), SCA_NORController::Trigger(), SCA_ORController::Trigger(), UnlinkActuator(), and UnlinkAllActuators().
std::vector<class SCA_ISensor*> SCA_IController::m_linkedsensors [protected] |
Definition at line 47 of file SCA_IController.h.
Referenced by ApplyState(), SCA_ExpressionController::FindIdentifier(), GetLinkedSensors(), LinkToSensor(), SCA_NANDController::Trigger(), SCA_XORController::Trigger(), SCA_ANDController::Trigger(), SCA_XNORController::Trigger(), SCA_NORController::Trigger(), SCA_ORController::Trigger(), UnlinkAllSensors(), and UnlinkSensor().
unsigned int SCA_IController::m_statemask [protected] |
Definition at line 49 of file SCA_IController.h.
Referenced by ApplyState(), and SetState().