|
Blender
V2.59
|
00001 /* 00002 * Manager for 'always' events. Since always sensors can operate in pulse 00003 * mode, they need to be activated. 00004 * 00005 * $Id: SCA_AlwaysEventManager.cpp 35169 2011-02-25 13:32:11Z jesterking $ 00006 * 00007 * ***** BEGIN GPL LICENSE BLOCK ***** 00008 * 00009 * This program is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU General Public License 00011 * as published by the Free Software Foundation; either version 2 00012 * of the License, or (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software Foundation, 00021 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00022 * 00023 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00024 * All rights reserved. 00025 * 00026 * The Original Code is: all of this file. 00027 * 00028 * Contributor(s): none yet. 00029 * 00030 * ***** END GPL LICENSE BLOCK ***** 00031 */ 00032 00038 #include "SCA_AlwaysEventManager.h" 00039 #include "SCA_LogicManager.h" 00040 #include <vector> 00041 #include "SCA_ISensor.h" 00042 00043 using namespace std; 00044 00045 SCA_AlwaysEventManager::SCA_AlwaysEventManager(class SCA_LogicManager* logicmgr) 00046 : SCA_EventManager(logicmgr, ALWAYS_EVENTMGR) 00047 { 00048 } 00049 00050 00051 00052 void SCA_AlwaysEventManager::NextFrame() 00053 { 00054 SG_DList::iterator<SCA_ISensor> it(m_sensors); 00055 for (it.begin();!it.end();++it) 00056 { 00057 (*it)->Activate(m_logicmgr); 00058 } 00059 } 00060