Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# OgreControllerManager.h

Go to the documentation of this file.

    00001 /*
    00002 -----------------------------------------------------------------------------
    00003 This source file is part of OGRE
    00004     (Object-oriented Graphics Rendering Engine)
    00005 For the latest info, see http://www.ogre3d.org/
    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 "OgreTextureUnitState.h"
    00035 #include "OgreSharedPtr.h"
    00036
    00037 namespace Ogre {
    00038
    00039
    00046     class _OgreExport ControllerManager : public Singleton<ControllerManager>
    00047     {
    00048     protected:
    00049         typedef std::set<Controller<Real>*> ControllerList;
    00050         ControllerList mControllers;
    00051
    00053         SharedPtr< ControllerValue<Real> > mFrameTimeController;
    00054
    00055     public:
    00056         ControllerManager();
    00057         ~ControllerManager();
    00058
    00061         Controller<Real>* createController(SharedPtr< ControllerValue<Real> > src,
    00062             SharedPtr< ControllerValue<Real> > dest, SharedPtr< ControllerFunction<Real> > func);
    00063
    00066         void clearControllers(void);
    00067
    00070         void updateAllControllers(void);
    00071
    00072
    00082         SharedPtr< ControllerValue<Real> > getFrameTimeSource(void) const;
    00083
    00093         Controller<Real>* createTextureAnimator(TextureUnitState* layer, Real sequenceTime);
    00094
    00107         Controller<Real>* createTextureScroller(TextureUnitState* layer, Real uSpeed, Real vSpeed);
    00108
    00119         Controller<Real>* createTextureRotater(TextureUnitState* layer, Real speed);
    00120
    00138         Controller<Real>* createTextureWaveTransformer(TextureUnitState* layer, TextureUnitState::TextureTransformType ttype,
    00139             WaveformType waveType, Real base = 0, Real frequency = 1, Real phase = 0, Real amplitude = 1);
    00140
    00150         Controller<Real>* createGpuProgramTimerParam(GpuProgramParameters* params, size_t paramIndex,
    00151             Real timeFactor = 1.0f);
    00152
    00155         void destroyController(Controller<Real>* controller);
    00156
    00161         Real getTimeFactor(void) const;
    00162
    00171         void setTimeFactor(Real tf);
    00187         static ControllerManager& getSingleton(void);
    00203         static ControllerManager* getSingletonPtr(void);
    00204     };
    00205
    00206
    00207 }
    00208 #endif

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:18 2004