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

# OgreRotationAffector.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 __RotationAffector_H__
    00026 #define __RotationAffector_H__
    00027
    00028 #include "OgreMath.h"
    00029 #include "OgreParticleFXPrerequisites.h"
    00030 #include "OgreParticleAffector.h"
    00031 #include "OgreStringInterface.h"
    00032
    00033 namespace Ogre {
    00034
    00035
    00041     class _OgreParticleFXExport RotationAffector : public ParticleAffector
    00042     {
    00043     public:
    00045         class CmdRotationSpeedRangeStart : public ParamCommand
    00046         {
    00047         public:
    00048             String doGet(const void* target) const;
    00049             void doSet(void* target, const String& val);
    00050         };
    00051
    00053         class CmdRotationSpeedRangeEnd : public ParamCommand
    00054         {
    00055         public:
    00056             String doGet(const void* target) const;
    00057             void doSet(void* target, const String& val);
    00058         };
    00059
    00061         class CmdRotationRangeStart : public ParamCommand
    00062         {
    00063         public:
    00064             String doGet(const void* target) const;
    00065             void doSet(void* target, const String& val);
    00066         };
    00067
    00069         class CmdRotationRangeEnd : public ParamCommand
    00070         {
    00071         public:
    00072             String doGet(const void* target) const;
    00073             void doSet(void* target, const String& val);
    00074         };
    00075
    00077         RotationAffector();
    00078
    00080         void _initParticle(Particle* pParticle);
    00081
    00083         void _affectParticles(ParticleSystem* pSystem, Real timeElapsed);
    00084
    00085
    00086
    00088         void setRotationSpeedRangeStart(const Radian& angle);
    00089 #ifndef OGRE_FORCE_ANGLE_TYPES
    00090         inline void setRotationSpeedRangeStart(Real angle) {
    00091             setRotationSpeedRangeStart(Angle(angle));
    00092         }
    00093 #endif//OGRE_FORCE_ANGLE_TYPES
    00094
    00095         void setRotationSpeedRangeEnd(const Radian& angle);
    00096 #ifndef OGRE_FORCE_ANGLE_TYPES
    00097         inline void setRotationSpeedRangeEnd(Real angle) {
    00098             setRotationSpeedRangeEnd(Angle(angle));
    00099         }
    00100 #endif//OGRE_FORCE_ANGLE_TYPES
    00101
    00102         const Radian& getRotationSpeedRangeStart(void) const;
    00104         const Radian& getRotationSpeedRangeEnd(void) const;
    00105
    00106
    00108         void setRotationRangeStart(const Radian& angle);
    00109 #ifndef OGRE_FORCE_ANGLE_TYPES
    00110         inline void setRotationRangeStart(Real angle) {
    00111             setRotationRangeStart(Angle(angle));
    00112         }
    00113 #endif//OGRE_FORCE_ANGLE_TYPES
    00114
    00115         void setRotationRangeEnd(const Radian& angle);
    00116 #ifndef OGRE_FORCE_ANGLE_TYPES
    00117         inline void setRotationRangeEnd(Real angle) {
    00118             setRotationRangeEnd(Angle(angle));
    00119         }
    00120 #endif//OGRE_FORCE_ANGLE_TYPES
    00121
    00122         const Radian& getRotationRangeStart(void) const;
    00124         const Radian& getRotationRangeEnd(void) const;
    00125
    00126         static CmdRotationSpeedRangeStart   msRotationSpeedRangeStartCmd;
    00127         static CmdRotationSpeedRangeEnd     msRotationSpeedRangeEndCmd;
    00128         static CmdRotationRangeStart        msRotationRangeStartCmd;
    00129         static CmdRotationRangeEnd          msRotationRangeEndCmd;
    00130
    00131     protected:
    00133         Radian mRotationSpeedRangeStart;
    00135         Radian mRotationSpeedRangeEnd;
    00137         Radian mRotationRangeStart;
    00139         Radian mRotationRangeEnd;
    00140
    00141     };
    00142
    00143
    00144 }
    00145
    00146
    00147 #endif
    00148

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