# OgreAreaEmitter.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 (c) 2000-2005 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 __AreaEmitter_H__
    00026 #define __AreaEmitter_H__
    00027
    00028 #include "OgreParticleFXPrerequisites.h"
    00029 #include "OgreParticleEmitter.h"
    00030
    00031 namespace Ogre {
    00032
    00044     class _OgreParticleFXExport AreaEmitter : public ParticleEmitter
    00045     {
    00046     public:
    00048         class CmdWidth : public ParamCommand
    00049         {
    00050         public:
    00051             String doGet(const void* target) const;
    00052             void doSet(void* target, const String& val);
    00053         };
    00055         class CmdHeight : public ParamCommand
    00056         {
    00057         public:
    00058             String doGet(const void* target) const;
    00059             void doSet(void* target, const String& val);
    00060         };
    00062         class CmdDepth : public ParamCommand
    00063         {
    00064         public:
    00065             String doGet(const void* target) const;
    00066             void doSet(void* target, const String& val);
    00067         };
    00068
    00069
    00070         AreaEmitter(ParticleSystem* psys) : ParticleEmitter(psys) {}
    00071
    00072
    00074         unsigned short _getEmissionCount(Real timeElapsed);
    00075
    00077         void setDirection( const Vector3& direction );
    00078
    00086         void setSize(const Vector3& size);
    00087
    00095         void setSize(Real x, Real y, Real z);
    00102 //        void setClearSpace(Real x, Real y, Real z);
    00103
    00105         void setWidth(Real width);
    00107         Real getWidth(void) const;
    00109         void setHeight(Real Height);
    00111         Real getHeight(void) const;
    00113         void setDepth(Real Depth);
    00115         Real getDepth(void) const;
    00116
    00117     protected:
    00119         Vector3 mSize;
    00120
    00122         Vector3 mXRange, mYRange, mZRange;
    00123
    00125         void genAreaAxes(void);
    00129         bool initDefaults(const String& mType);
    00130
    00132         static CmdWidth msWidthCmd;
    00133         static CmdHeight msHeightCmd;
    00134         static CmdDepth msDepthCmd;
    00135
    00136
    00137
    00138     };
    00139
    00140 }
    00141
    00142 #endif
    00143

Copyright © 2000-2005 by The OGRE Team
Last modified Sun Nov 20 12:35:56 2005