00001 /* 00002 ----------------------------------------------------------------------------- 00003 This source file is part of OGRE 00004 (Object-oriented Graphics Rendering Engine) 00005 For the latest info, see http://ogre.sourceforge.net/ 00006 00007 Copyright © 2000-2002 The OGRE Team 00008 Also see acknowledgements in Readme.html 00009 00010 This program is free software; you can redistribute it and/or modify it under 00011 the terms of the GNU Lesser General Public License as published by the Free Software 00012 Foundation; either version 2 of the License, or (at your option) any later 00013 version. 00014 00015 This program is distributed in the hope that it will be useful, but WITHOUT 00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public License along with 00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to 00022 http://www.gnu.org/copyleft/lesser.txt. 00023 ----------------------------------------------------------------------------- 00024 */ 00025 #ifndef __ControllerManager_H__ 00026 #define __ControllerManager_H__ 00027 00028 #include "OgrePrerequisites.h" 00029 00030 #include "OgreCommon.h" 00031 #include "OgreSingleton.h" 00032 #include "OgreController.h" 00033 #include "OgrePredefinedControllers.h" 00034 #include "OgreMaterial.h" 00035 00036 namespace Ogre { 00037 00038 00045 class _OgreExport ControllerManager : public Singleton<ControllerManager> 00046 { 00047 protected: 00048 typedef std::set<Controller*> ControllerList; 00049 ControllerList mControllers; 00050 00052 FrameTimeControllerValue mFrameTimeController; 00053 00054 public: 00055 ControllerManager(); 00056 ~ControllerManager(); 00057 00060 Controller* createController(ControllerValue* src, ControllerValue* dest, ControllerFunction* func); 00061 00064 void clearControllers(void); 00065 00068 void updateAllControllers(void); 00069 00070 00080 ControllerValue* getFrameTimeSource(void); 00081 00091 Controller* createTextureAnimator(Material::TextureLayer* layer, Real sequenceTime); 00092 00105 Controller* createTextureScroller(Material::TextureLayer* layer, Real uSpeed, Real vSpeed); 00106 00117 Controller* createTextureRotater(Material::TextureLayer* layer, Real speed); 00118 00136 Controller* createTextureWaveTransformer(Material::TextureLayer* layer, Material::TextureLayer::TextureTransformType ttype, 00137 WaveformType waveType, Real base = 0, Real frequency = 1, Real phase = 0, Real amplitude = 1); 00138 00139 00151 static ControllerManager& getSingleton(void); 00152 00155 void destroyController(Controller* controller); 00156 00161 Real getTimeFactor(void); 00162 00171 void setTimeFactor(Real tf); 00172 }; 00173 00174 00175 } 00176 #endif
Copyright © 2002 by The OGRE Team