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

# OgreParticleEmitterCommands.cpp

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 #include "OgreStableHeaders.h"
    00026 #include "OgreParticleEmitterCommands.h"
    00027 #include "OgreParticleEmitter.h"
    00028 #include "OgreStringConverter.h"
    00029
    00030
    00031 namespace Ogre {
    00032
    00033     namespace EmitterCommands {
    00034
    00035         //-----------------------------------------------------------------------
    00036         String CmdAngle::doGet(const void* target) const
    00037         {
    00038             return StringConverter::toString(
    00039                 static_cast<const ParticleEmitter*>(target)->getAngle() );
    00040         }
    00041         void CmdAngle::doSet(void* target, const String& val)
    00042         {
    00043             static_cast<ParticleEmitter*>(target)->setAngle(StringConverter::parseAngle(val));
    00044         }
    00045         //-----------------------------------------------------------------------
    00046         String CmdColour::doGet(const void* target) const
    00047         {
    00048             return StringConverter::toString(
    00049                 static_cast<const ParticleEmitter*>(target)->getColour() );
    00050         }
    00051         void CmdColour::doSet(void* target, const String& val)
    00052         {
    00053             static_cast<ParticleEmitter*>(target)->setColour(StringConverter::parseColourValue(val));
    00054         }
    00055         //-----------------------------------------------------------------------
    00056         String CmdColourRangeStart::doGet(const void* target) const
    00057         {
    00058             return StringConverter::toString(
    00059                 static_cast<const ParticleEmitter*>(target)->getColourRangeStart() );
    00060         }
    00061         void CmdColourRangeStart::doSet(void* target, const String& val)
    00062         {
    00063             static_cast<ParticleEmitter*>(target)->setColourRangeStart(StringConverter::parseColourValue(val));
    00064         }
    00065         //-----------------------------------------------------------------------
    00066         String CmdColourRangeEnd::doGet(const void* target) const
    00067         {
    00068             return StringConverter::toString(
    00069                 static_cast<const ParticleEmitter*>(target)->getColourRangeEnd() );
    00070         }
    00071         void CmdColourRangeEnd::doSet(void* target, const String& val)
    00072         {
    00073             static_cast<ParticleEmitter*>(target)->setColourRangeEnd(StringConverter::parseColourValue(val));
    00074         }
    00075         //-----------------------------------------------------------------------
    00076         String CmdDirection::doGet(const void* target) const
    00077         {
    00078             return StringConverter::toString(
    00079                 static_cast<const ParticleEmitter*>(target)->getDirection() );
    00080         }
    00081         void CmdDirection::doSet(void* target, const String& val)
    00082         {
    00083             static_cast<ParticleEmitter*>(target)->setDirection(StringConverter::parseVector3(val));
    00084         }
    00085         //-----------------------------------------------------------------------
    00086         String CmdEmissionRate::doGet(const void* target) const
    00087         {
    00088             return StringConverter::toString(
    00089                 static_cast<const ParticleEmitter*>(target)->getEmissionRate() );
    00090         }
    00091         void CmdEmissionRate::doSet(void* target, const String& val)
    00092         {
    00093             static_cast<ParticleEmitter*>(target)->setEmissionRate(StringConverter::parseReal(val));
    00094         }
    00095         //-----------------------------------------------------------------------
    00096         String CmdMaxTTL::doGet(const void* target) const
    00097         {
    00098             return StringConverter::toString(
    00099                 static_cast<const ParticleEmitter*>(target)->getMaxTimeToLive() );
    00100         }
    00101         void CmdMaxTTL::doSet(void* target, const String& val)
    00102         {
    00103             static_cast<ParticleEmitter*>(target)->setMaxTimeToLive(StringConverter::parseReal(val));
    00104         }
    00105         //-----------------------------------------------------------------------
    00106         String CmdMinTTL::doGet(const void* target) const
    00107         {
    00108             return StringConverter::toString(
    00109                 static_cast<const ParticleEmitter*>(target)->getMinTimeToLive() );
    00110         }
    00111         void CmdMinTTL::doSet(void* target, const String& val)
    00112         {
    00113             static_cast<ParticleEmitter*>(target)->setMinTimeToLive(StringConverter::parseReal(val));
    00114         }
    00115         //-----------------------------------------------------------------------
    00116         String CmdMaxVelocity::doGet(const void* target) const
    00117         {
    00118             return StringConverter::toString(
    00119                 static_cast<const ParticleEmitter*>(target)->getMaxParticleVelocity() );
    00120         }
    00121         void CmdMaxVelocity::doSet(void* target, const String& val)
    00122         {
    00123             static_cast<ParticleEmitter*>(target)->setMaxParticleVelocity(StringConverter::parseReal(val));
    00124         }
    00125         //-----------------------------------------------------------------------
    00126         String CmdMinVelocity::doGet(const void* target) const
    00127         {
    00128             return StringConverter::toString(
    00129                 static_cast<const ParticleEmitter*>(target)->getMinParticleVelocity() );
    00130         }
    00131         void CmdMinVelocity::doSet(void* target, const String& val)
    00132         {
    00133             static_cast<ParticleEmitter*>(target)->setMinParticleVelocity(StringConverter::parseReal(val));
    00134         }
    00135         //-----------------------------------------------------------------------
    00136         String CmdPosition::doGet(const void* target) const
    00137         {
    00138             return StringConverter::toString(
    00139                 static_cast<const ParticleEmitter*>(target)->getPosition() );
    00140         }
    00141         void CmdPosition::doSet(void* target, const String& val)
    00142         {
    00143             static_cast<ParticleEmitter*>(target)->setPosition(StringConverter::parseVector3(val));
    00144         }
    00145         //-----------------------------------------------------------------------
    00146         String CmdTTL::doGet(const void* target) const
    00147         {
    00148             return StringConverter::toString(
    00149                 static_cast<const ParticleEmitter*>(target)->getTimeToLive() );
    00150         }
    00151         void CmdTTL::doSet(void* target, const String& val)
    00152         {
    00153             static_cast<ParticleEmitter*>(target)->setTimeToLive(StringConverter::parseReal(val));
    00154         }
    00155         //-----------------------------------------------------------------------
    00156         String CmdVelocity::doGet(const void* target) const
    00157         {
    00158             return StringConverter::toString(
    00159                 static_cast<const ParticleEmitter*>(target)->getParticleVelocity() );
    00160         }
    00161         void CmdVelocity::doSet(void* target, const String& val)
    00162         {
    00163             static_cast<ParticleEmitter*>(target)->setParticleVelocity(StringConverter::parseReal(val));
    00164         }
    00165         //-----------------------------------------------------------------------
    00166         String CmdDuration::doGet(const void* target) const
    00167         {
    00168             return StringConverter::toString(
    00169                 static_cast<const ParticleEmitter*>(target)->getDuration() );
    00170         }
    00171         void CmdDuration::doSet(void* target, const String& val)
    00172         {
    00173             static_cast<ParticleEmitter*>(target)->setDuration(StringConverter::parseReal(val));
    00174         }
    00175         //-----------------------------------------------------------------------
    00176         String CmdMinDuration::doGet(const void* target) const
    00177         {
    00178             return StringConverter::toString(
    00179                 static_cast<const ParticleEmitter*>(target)->getMinDuration() );
    00180         }
    00181         void CmdMinDuration::doSet(void* target, const String& val)
    00182         {
    00183             static_cast<ParticleEmitter*>(target)->setMinDuration(StringConverter::parseReal(val));
    00184         }
    00185         //-----------------------------------------------------------------------
    00186         String CmdMaxDuration::doGet(const void* target) const
    00187         {
    00188             return StringConverter::toString(
    00189                 static_cast<const ParticleEmitter*>(target)->getMaxDuration() );
    00190         }
    00191         void CmdMaxDuration::doSet(void* target, const String& val)
    00192         {
    00193             static_cast<ParticleEmitter*>(target)->setMaxDuration(StringConverter::parseReal(val));
    00194         }
    00195         //-----------------------------------------------------------------------
    00196         String CmdRepeatDelay::doGet(const void* target) const
    00197         {
    00198             return StringConverter::toString(
    00199                 static_cast<const ParticleEmitter*>(target)->getRepeatDelay() );
    00200         }
    00201         void CmdRepeatDelay::doSet(void* target, const String& val)
    00202         {
    00203             static_cast<ParticleEmitter*>(target)->setRepeatDelay(StringConverter::parseReal(val));
    00204         }
    00205         //-----------------------------------------------------------------------
    00206         String CmdMinRepeatDelay::doGet(const void* target) const
    00207         {
    00208             return StringConverter::toString(
    00209                 static_cast<const ParticleEmitter*>(target)->getMinRepeatDelay() );
    00210         }
    00211         void CmdMinRepeatDelay::doSet(void* target, const String& val)
    00212         {
    00213             static_cast<ParticleEmitter*>(target)->setMinRepeatDelay(StringConverter::parseReal(val));
    00214         }
    00215         //-----------------------------------------------------------------------
    00216         String CmdMaxRepeatDelay::doGet(const void* target) const
    00217         {
    00218             return StringConverter::toString(
    00219                 static_cast<const ParticleEmitter*>(target)->getMaxRepeatDelay() );
    00220         }
    00221         void CmdMaxRepeatDelay::doSet(void* target, const String& val)
    00222         {
    00223             static_cast<ParticleEmitter*>(target)->setMaxRepeatDelay(StringConverter::parseReal(val));
    00224         }
    00225
    00226
    00227
    00228     }
    00229 }
    00230

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